How to use the SymbolFlags function from typescript

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

378
379
380
381
382
383
384
385
386
387
 * @param orUnknown If true, this function will also return true when the node is unknown.
 */
function isNodeAny(node, checker, orUnknown) {
    if (orUnknown === void 0) { orUnknown = false; }
    var symbol = checker.getSymbolAtLocation(node);
    if (symbol !== undefined && tsutils_1.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)) {
        symbol = checker.getAliasedSymbol(symbol);
    }
    if (symbol !== undefined) {
        // NamespaceModule is a type-only namespace without runtime value, its type is 'any' when used as 'ns.Type' -> avoid error
fork icon0
star icon0
watch icon1

+ 1577 other calls in file

121
122
123
124
125
126
127
128
129
130
            // For compatibility with typescript@2.5: compare declarations because the symbols don't have the same reference
            Lint.Utils.arraysAreEqual(accessed.declarations, inScope.declarations, function (a, b) { return a === b; }));
    }
}
function tryGetAliasedSymbol(symbol, checker) {
    return utils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)
        ? checker.getAliasedSymbol(symbol)
        : undefined;
}
/** Wrapper for compatability with typescript@<3.8.2 */
fork icon0
star icon0
watch icon1

+ 260 other calls in file

102
103
104
105
106
107
108
109
110
111
  const F = ts.TypeFlags;
  return (type.getFlags() & (F.Undefined | F.Null)) !== 0;
}

function isFunction(symbol) {
  const F = ts.SymbolFlags;
  return (symbol.getFlags() & (F.Function | F.Method | F.Constructor)) !== 0;
}

function checkNode(tsNode, type, scope) {
fork icon0
star icon0
watch icon2

+ 13 other calls in file

Other functions in typescript

Sorted by popularity

function icon

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