Skip to content

Commit b548de8

Browse files
committed
Removes symbol binding and changes anyType to unknownType
1 parent 7dd7225 commit b548de8

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

src/compiler/binder.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ module ts {
128128
case SyntaxKind.FunctionDeclaration:
129129
case SyntaxKind.ClassDeclaration:
130130
return node.flags & NodeFlags.Default ? "default" : undefined;
131-
case SyntaxKind.TypeGuardType:
132-
return "__typeguard";
133131
}
134132
}
135133

@@ -431,9 +429,6 @@ module ts {
431429
case SyntaxKind.TypeParameter:
432430
bindDeclaration(<Declaration>node, SymbolFlags.TypeParameter, SymbolFlags.TypeParameterExcludes, /*isBlockScopeContainer*/ false);
433431
break;
434-
case SyntaxKind.TypeGuardType:
435-
bindDeclaration(<Declaration>node, (SymbolFlags.TypeGuardType | SymbolFlags.Value), SymbolFlags.TypeGuardTypeExcludes, /*isBlockScopeContainer*/ false);
436-
break;
437432
case SyntaxKind.Parameter:
438433
bindParameter(<ParameterDeclaration>node);
439434
break;

src/compiler/checker.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3726,9 +3726,8 @@ module ts {
37263726
}
37273727
}
37283728
else {
3729-
type.type = anyType;
3729+
type.type = unknownType;
37303730
}
3731-
type.symbol = node.symbol;
37323731
return type;
37333732
}
37343733

src/compiler/types.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,24 +1313,23 @@ module ts {
13131313
SetAccessor = 0x00010000, // Set accessor
13141314
Signature = 0x00020000, // Call, construct, or index signature
13151315
TypeParameter = 0x00040000, // Type parameter
1316-
TypeGuardType = 0x00080000, // Type-guard type
1317-
TypeAlias = 0x00100000, // Type alias
1318-
ExportValue = 0x00200000, // Exported value marker (see comment in declareModuleMember in binder)
1319-
ExportType = 0x00400000, // Exported type marker (see comment in declareModuleMember in binder)
1320-
ExportNamespace = 0x00800000, // Exported namespace marker (see comment in declareModuleMember in binder)
1321-
Alias = 0x01000000, // An alias for another symbol (see comment in isAliasSymbolDeclaration in checker)
1322-
Instantiated = 0x02000000, // Instantiated symbol
1323-
Merged = 0x04000000, // Merged symbol (created during program binding)
1324-
Transient = 0x08000000, // Transient symbol (created during type check)
1325-
Prototype = 0x10000000, // Prototype property (no source representation)
1326-
UnionProperty = 0x20000000, // Property in union type
1327-
Optional = 0x40000000, // Optional property
1328-
ExportStar = 0x80000000, // Export * declaration
1316+
TypeAlias = 0x00080000, // Type alias
1317+
ExportValue = 0x00100000, // Exported value marker (see comment in declareModuleMember in binder)
1318+
ExportType = 0x00200000, // Exported type marker (see comment in declareModuleMember in binder)
1319+
ExportNamespace = 0x00400000, // Exported namespace marker (see comment in declareModuleMember in binder)
1320+
Alias = 0x00800000, // An alias for another symbol (see comment in isAliasSymbolDeclaration in checker)
1321+
Instantiated = 0x01000000, // Instantiated symbol
1322+
Merged = 0x02000000, // Merged symbol (created during program binding)
1323+
Transient = 0x04000000, // Transient symbol (created during type check)
1324+
Prototype = 0x08000000, // Prototype property (no source representation)
1325+
UnionProperty = 0x10000000, // Property in union type
1326+
Optional = 0x20000000, // Optional property
1327+
ExportStar = 0x40000000, // Export * declaration
13291328

13301329
Enum = RegularEnum | ConstEnum,
13311330
Variable = FunctionScopedVariable | BlockScopedVariable,
13321331
Value = Variable | Property | EnumMember | Function | Class | Enum | ValueModule | Method | GetAccessor | SetAccessor,
1333-
Type = Class | Interface | Enum | TypeLiteral | ObjectLiteral | TypeParameter | TypeAlias | TypeGuardType,
1332+
Type = Class | Interface | Enum | TypeLiteral | ObjectLiteral | TypeParameter | TypeAlias,
13341333
Namespace = ValueModule | NamespaceModule,
13351334
Module = ValueModule | NamespaceModule,
13361335
Accessor = GetAccessor | SetAccessor,
@@ -1357,7 +1356,6 @@ module ts {
13571356
GetAccessorExcludes = Value & ~SetAccessor,
13581357
SetAccessorExcludes = Value & ~GetAccessor,
13591358
TypeParameterExcludes = Type & ~TypeParameter,
1360-
TypeGuardTypeExcludes = Type & ~TypeGuardType,
13611359
TypeAliasExcludes = Type,
13621360
AliasExcludes = Alias,
13631361

0 commit comments

Comments
 (0)