How to use the NodeFlags function from typescript

Find comprehensive JavaScript typescript.NodeFlags code examples handpicked from public code repositorys.

336
337
338
339
340
341
342
343
344
345
346
    return ts.createModuleDeclaration(
        undefined,
        [ts.createModifier(ts.SyntaxKind.DeclareKeyword)],
        ts.createIdentifier('global'),
        ts.createModuleBlock(statements),
        ts.NodeFlags.GlobalAugmentation
    );
}


/**
fork icon116
star icon294
watch icon29

170
171
172
173
174
175
176
177
178
179
    if (!ctx.options.allCapsForConst || tsutils.isBindingPattern(node.name)) {
        return;
    }
    var declarationList = node.parent;
    var text = node.name.text;
    if (utils_1.isUpperCase(text) && !tsutils.isNodeFlagSet(declarationList, ts.NodeFlags.Const)) {
        ctx.addFailureAtNode(node, Rule.FAILURE_STRING_CONST);
    }
}
function formatFailure() {
fork icon0
star icon0
watch icon1

+ 2 other calls in file

57
58
59
60
61
62
63
64
65
66
        ts.NodeFlags.ExportContext |
        ts.NodeFlags.Ambient |
        ts.NodeFlags.ContextFlags
    ),
  ]),
  ts.NodeFlags.ExportContext |
    ts.NodeFlags.GlobalAugmentation |
    ts.NodeFlags.Ambient |
    ts.NodeFlags.ContextFlags
);
fork icon0
star icon0
watch icon1

+ 551 other calls in file

319
320
321
322
323
324
325
326
327
328
const isDefault = !!modifiers
    && modifiers.some(x => x.kind === ts.SyntaxKind.DefaultKeyword);
const newStatement = [];
newStatement.push(ts.createVariableStatement(isDefault ? undefined : modifiers, ts.createVariableDeclarationList([
    ts.createVariableDeclaration(name, undefined, pureIife),
], ts.NodeFlags.Let)));
if (isDefault) {
    newStatement.push(ts.createExportAssignment(undefined, undefined, false, ts.createIdentifier(name)));
}
return newStatement;
fork icon0
star icon0
watch icon1

Other functions in typescript

Sorted by popularity

function icon

typescript.SyntaxKind is the most popular function in typescript (82777 examples)