Home
last modified time | relevance | path

Searched refs:TypeFlags (Results 1 – 25 of 66) sorted by relevance

123

/third_party/typescript_eslint/packages/eslint-plugin/src/rules/
Dstrict-boolean-expressions.ts304 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 …]
Dno-unnecessary-condition.ts40 .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 …]
Drestrict-template-expressions.ts54 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)
Dno-unnecessary-type-assertion.ts169 ts.TypeFlags.Undefined,
173 ts.TypeFlags.Null,
178 ts.TypeFlags.Undefined,
182 ts.TypeFlags.Null,
225 isTypeFlagSet(castType, ts.TypeFlags.Literal) ||
Dno-unnecessary-boolean-literal-compare.ts116 ts.TypeFlags.Boolean | ts.TypeFlags.BooleanLiteral,
137 ts.TypeFlags.Undefined | ts.TypeFlags.Null,
Dno-base-to-string.ts96 type.flags & ts.TypeFlags.Boolean ||
97 type.flags & ts.TypeFlags.BooleanLiteral
Dno-for-in-array.ts35 (type.flags & ts.TypeFlags.StringLike) !== 0
/third_party/typescript/tests/baselines/reference/
DparserRealSource2.js212 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 …]
DparserRealSource2.types1009 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 …]
DparserRealSource2.symbols585 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/
Dtypes.ts46 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/
Dchecker.ts651 …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 …]
Ddebug.ts366 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 …]
DsymbolWalker.ts61 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) {
Dtracing.ts199 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/
DinferFromUsage.ts763 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 …]
DfixJSDocTypes.ts19 …actions.push(fix(checker.getNullableType(type, TypeFlags.Undefined), fixIdNullable, Diagnostics.Ch…
36 …NullableType && fixId === fixIdNullable ? checker.getNullableType(type, TypeFlags.Undefined) : typ…
DfixAddVoidToPromise.ts54 if (!parameterType || parameterType.flags & TypeFlags.AnyOrUnknown) {
61 if (!parameterType || parameterType.flags & TypeFlags.Unknown) {
DfixStrictClassInitialization.ts112 if (type.flags & TypeFlags.BooleanLiteral) {
121 else if (type.flags & TypeFlags.BigIntLiteral) {
/third_party/typescript/src/services/
Drename.ts19 if (type && ((type.flags & TypeFlags.StringLiteral) || (
20 …(type.flags & TypeFlags.Union) && every((type as UnionType).types, type => !!(type.flags & TypeFla…
/third_party/cef/include/
Dcef_context_menu_handler.h143 typedef cef_context_menu_type_flags_t TypeFlags; typedef
167 virtual TypeFlags GetTypeFlags() = 0;
/third_party/cef/libcef/browser/
Dcontext_menu_params_impl.cc32 CefContextMenuParamsImpl::TypeFlags CefContextMenuParamsImpl::GetTypeFlags() { in GetTypeFlags()
48 return static_cast<TypeFlags>(type_flags); in GetTypeFlags()
Dcontext_menu_params_impl.h26 TypeFlags GetTypeFlags() override;
/third_party/typescript/src/testRunner/unittests/
DpublicApi.ts104 assert.ok(!(type.flags & ts.TypeFlags.Any));
124 assert.equal(type.flags, ts.TypeFlags.Any);
/third_party/typescript/src/harness/
DtypeWriter.ts117 … if (!type || type.flags & ts.TypeFlags.Any) type = this.checker.getTypeAtLocation(node);
132 type.flags & ts.TypeFlags.Any &&

123