/third_party/typescript_eslint/packages/eslint-plugin/src/rules/ |
D | strict-boolean-expressions.ts | 304 ts.TypeFlags.Null | ts.TypeFlags.Undefined | ts.TypeFlags.VoidLike, 313 tsutils.isTypeFlagSet(type, ts.TypeFlags.BooleanLike), 320 types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.StringLike)) 329 ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike, 341 ts.TypeFlags.Null | 342 ts.TypeFlags.Undefined | 343 ts.TypeFlags.VoidLike | 344 ts.TypeFlags.BooleanLike | 345 ts.TypeFlags.StringLike | 346 ts.TypeFlags.NumberLike | [all …]
|
D | no-unnecessary-condition.ts | 40 .some(type => isTypeFlagSet(type, ts.TypeFlags.PossiblyFalsy)); 46 const nullishFlag = ts.TypeFlags.Undefined | ts.TypeFlags.Null; 60 type.flags === ts.TypeFlags.Undefined || 61 type.flags === ts.TypeFlags.Null || 62 type.flags === ts.TypeFlags.Void || 243 isTypeFlagSet(part, ts.TypeFlags.TypeParameter), 250 if (isTypeFlagSet(type, ts.TypeFlags.Never)) { 277 if (isTypeFlagSet(type, ts.TypeFlags.Never)) { 324 const UNDEFINED = ts.TypeFlags.Undefined; 325 const NULL = ts.TypeFlags.Null; [all …]
|
D | restrict-template-expressions.ts | 54 if (util.isTypeFlagSet(type, ts.TypeFlags.StringLike)) { 62 ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike, 70 util.isTypeFlagSet(type, ts.TypeFlags.BooleanLike) 81 util.isTypeFlagSet(type, ts.TypeFlags.Null | ts.TypeFlags.Undefined)
|
D | no-unnecessary-type-assertion.ts | 169 ts.TypeFlags.Undefined, 173 ts.TypeFlags.Null, 178 ts.TypeFlags.Undefined, 182 ts.TypeFlags.Null, 225 isTypeFlagSet(castType, ts.TypeFlags.Literal) ||
|
D | no-unnecessary-boolean-literal-compare.ts | 116 ts.TypeFlags.Boolean | ts.TypeFlags.BooleanLiteral, 137 ts.TypeFlags.Undefined | ts.TypeFlags.Null,
|
D | no-base-to-string.ts | 96 type.flags & ts.TypeFlags.Boolean || 97 type.flags & ts.TypeFlags.BooleanLiteral
|
D | no-for-in-array.ts | 35 (type.flags & ts.TypeFlags.StringLike) !== 0
|
/third_party/typescript/tests/baselines/reference/ |
D | parserRealSource2.js | 212 export enum TypeFlags { 477 var TypeFlags; 478 (function (TypeFlags) { argument 479 TypeFlags[TypeFlags["None"] = 0] = "None"; 480 TypeFlags[TypeFlags["HasImplementation"] = 1] = "HasImplementation"; 481 TypeFlags[TypeFlags["HasSelfReference"] = 2] = "HasSelfReference"; 482 TypeFlags[TypeFlags["MergeResult"] = 4] = "MergeResult"; 483 TypeFlags[TypeFlags["IsEnum"] = 8] = "IsEnum"; 484 TypeFlags[TypeFlags["BuildingName"] = 16] = "BuildingName"; 485 TypeFlags[TypeFlags["HasBaseType"] = 32] = "HasBaseType"; [all …]
|
D | parserRealSource2.types | 1009 export enum TypeFlags { 1010 >TypeFlags : TypeFlags 1013 >None : TypeFlags 1017 >HasImplementation : TypeFlags 1021 >HasSelfReference : TypeFlags 1027 >MergeResult : TypeFlags 1033 >IsEnum : TypeFlags 1039 >BuildingName : TypeFlags 1045 >HasBaseType : TypeFlags 1051 >HasBaseTypeOfObject : TypeFlags [all …]
|
D | parserRealSource2.symbols | 585 export enum TypeFlags { 586 >TypeFlags : Symbol(TypeFlags, Decl(parserRealSource2.ts, 208, 5)) 589 >None : Symbol(TypeFlags.None, Decl(parserRealSource2.ts, 210, 27)) 592 >HasImplementation : Symbol(TypeFlags.HasImplementation, Decl(parserRealSource2.ts, 211, 17)) 595 >HasSelfReference : Symbol(TypeFlags.HasSelfReference, Decl(parserRealSource2.ts, 212, 30)) 598 >MergeResult : Symbol(TypeFlags.MergeResult, Decl(parserRealSource2.ts, 213, 34)) 601 >IsEnum : Symbol(TypeFlags.IsEnum, Decl(parserRealSource2.ts, 214, 29)) 604 >BuildingName : Symbol(TypeFlags.BuildingName, Decl(parserRealSource2.ts, 215, 24)) 607 >HasBaseType : Symbol(TypeFlags.HasBaseType, Decl(parserRealSource2.ts, 216, 30)) 610 >HasBaseTypeOfObject : Symbol(TypeFlags.HasBaseTypeOfObject, Decl(parserRealSource2.ts, 217, 29)) [all …]
|
/third_party/typescript_eslint/packages/eslint-plugin/src/util/ |
D | types.ts | 46 if (isTypeFlagSet(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { 83 if ((type.flags & ts.TypeFlags.StringLike) !== 0) { 90 if ((type.flags & ts.TypeFlags.TypeParameter) !== 0) { 161 if (isReceiver && flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { 166 return (flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) !== 0; 168 return (flags & ts.TypeFlags.Null) !== 0; 190 export function getTypeFlags(type: ts.Type): ts.TypeFlags { 191 let flags: ts.TypeFlags = 0; 204 flagsToCheck: ts.TypeFlags, 209 if (isReceiver && flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { [all …]
|
/third_party/typescript/src/compiler/ |
D | checker.ts | 651 …getDefaultFromTypeParameter: type => type && type.flags & TypeFlags.TypeParameter ? getDefaultFrom… 742 const anyType = createIntrinsicType(TypeFlags.Any, "any"); 743 const autoType = createIntrinsicType(TypeFlags.Any, "any"); 744 const wildcardType = createIntrinsicType(TypeFlags.Any, "any"); 745 const errorType = createIntrinsicType(TypeFlags.Any, "error"); 746 …const nonInferrableAnyType = createIntrinsicType(TypeFlags.Any, "any", ObjectFlags.ContainsWidenin… 747 const intrinsicMarkerType = createIntrinsicType(TypeFlags.Any, "intrinsic"); 748 const unknownType = createIntrinsicType(TypeFlags.Unknown, "unknown"); 749 const undefinedType = createIntrinsicType(TypeFlags.Undefined, "undefined"); 750 …edWideningType = strictNullChecks ? undefinedType : createIntrinsicType(TypeFlags.Undefined, "unde… [all …]
|
D | debug.ts | 366 export function formatTypeFlags(flags: TypeFlags | undefined): string { 367 return formatEnum(flags, (<any>ts).TypeFlags, /*isFlags*/ true); 537 this.flags & TypeFlags.Nullable ? "NullableType" : 538 …this.flags & TypeFlags.StringOrNumberLiteral ? `LiteralType ${JSON.stringify((this as LiteralType)… 539 …this.flags & TypeFlags.BigIntLiteral ? `LiteralType ${(this as BigIntLiteralType).value.negative ?… 540 this.flags & TypeFlags.UniqueESSymbol ? "UniqueESSymbolType" : 541 this.flags & TypeFlags.Enum ? "EnumType" : 542 … this.flags & TypeFlags.Intrinsic ? `IntrinsicType ${(this as IntrinsicType).intrinsicName}` : 543 this.flags & TypeFlags.Union ? "UnionType" : 544 this.flags & TypeFlags.Intersection ? "IntersectionType" : [all …]
|
D | symbolWalker.ts | 61 if (type.flags & TypeFlags.Object) { 77 if (type.flags & TypeFlags.TypeParameter) { 80 if (type.flags & TypeFlags.UnionOrIntersection) { 83 if (type.flags & TypeFlags.Index) { 86 if (type.flags & TypeFlags.IndexedAccess) {
|
D | tracing.ts | 199 if ((objectFlags & ObjectFlags.Anonymous) | (type.flags & TypeFlags.Literal)) { 209 if (type.flags & TypeFlags.IndexedAccess) { 227 if (type.flags & TypeFlags.Conditional) { 254 …unionTypes: (type.flags & TypeFlags.Union) ? (type as UnionType).types?.map(t => t.id) : undefined, 255 …intersectionTypes: (type.flags & TypeFlags.Intersection) ? (type as IntersectionType).types.map(t … 257 … keyofType: (type.flags & TypeFlags.Index) ? (type as IndexType).type?.id : undefined,
|
/third_party/typescript/src/services/codefixes/ |
D | inferFromUsage.ts | 763 if (operandType.flags & TypeFlags.EnumLike) { 774 if (otherOperandType.flags & TypeFlags.EnumLike) { 777 else if (otherOperandType.flags & TypeFlags.NumberLike) { 780 else if (otherOperandType.flags & TypeFlags.StringLike) { 783 else if (otherOperandType.flags & TypeFlags.Any) { 869 if (indexType.flags & TypeFlags.NumberLike) { 924 high: t => !(t.flags & (TypeFlags.Any | TypeFlags.Void)), 925 low: t => !!(t.flags & (TypeFlags.Any | TypeFlags.Void)) 928 …high: t => !(t.flags & (TypeFlags.Nullable | TypeFlags.Any | TypeFlags.Void)) && !(getObjectFlags(… 1073 else if (genericType.flags & TypeFlags.UnionOrIntersection) { [all …]
|
D | fixJSDocTypes.ts | 19 …actions.push(fix(checker.getNullableType(type, TypeFlags.Undefined), fixIdNullable, Diagnostics.Ch… 36 …NullableType && fixId === fixIdNullable ? checker.getNullableType(type, TypeFlags.Undefined) : typ…
|
D | fixAddVoidToPromise.ts | 54 if (!parameterType || parameterType.flags & TypeFlags.AnyOrUnknown) { 61 if (!parameterType || parameterType.flags & TypeFlags.Unknown) {
|
D | fixStrictClassInitialization.ts | 112 if (type.flags & TypeFlags.BooleanLiteral) { 121 else if (type.flags & TypeFlags.BigIntLiteral) {
|
/third_party/typescript/src/services/ |
D | rename.ts | 19 if (type && ((type.flags & TypeFlags.StringLiteral) || ( 20 …(type.flags & TypeFlags.Union) && every((type as UnionType).types, type => !!(type.flags & TypeFla…
|
/third_party/cef/include/ |
D | cef_context_menu_handler.h | 143 typedef cef_context_menu_type_flags_t TypeFlags; typedef 167 virtual TypeFlags GetTypeFlags() = 0;
|
/third_party/cef/libcef/browser/ |
D | context_menu_params_impl.cc | 32 CefContextMenuParamsImpl::TypeFlags CefContextMenuParamsImpl::GetTypeFlags() { in GetTypeFlags() 48 return static_cast<TypeFlags>(type_flags); in GetTypeFlags()
|
D | context_menu_params_impl.h | 26 TypeFlags GetTypeFlags() override;
|
/third_party/typescript/src/testRunner/unittests/ |
D | publicApi.ts | 104 assert.ok(!(type.flags & ts.TypeFlags.Any)); 124 assert.equal(type.flags, ts.TypeFlags.Any);
|
/third_party/typescript/src/harness/ |
D | typeWriter.ts | 117 … if (!type || type.flags & ts.TypeFlags.Any) type = this.checker.getTypeAtLocation(node); 132 type.flags & ts.TypeFlags.Any &&
|