From e4a11cb0c70cd08f4f48159a5809680dd402bcbe Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 4 Mar 2015 06:25:45 -0800 Subject: [PATCH] More comments --- src/compiler/checker.ts | 7 +++++++ src/compiler/types.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 12f2f7a8528..a859d37f64f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -460,6 +460,13 @@ module ts { return result; } + // An import symbol is created by one of the following declarations: + // import = ... + // import from ... + // import * as from ... + // import { x as } from ... + // export { x as } from ... + // export default ... function isImportSymbolDeclaration(node: Node): boolean { return node.kind === SyntaxKind.ImportEqualsDeclaration || node.kind === SyntaxKind.ImportClause && !!(node).name || diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4415b7326d1..97d8c122bfb 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1227,7 +1227,7 @@ module ts { ExportValue = 0x00100000, // Exported value marker (see comment in declareModuleMember in binder) ExportType = 0x00200000, // Exported type marker (see comment in declareModuleMember in binder) ExportNamespace = 0x00400000, // Exported namespace marker (see comment in declareModuleMember in binder) - Import = 0x00800000, // An alias for another symbol + Import = 0x00800000, // An alias for another symbol (see comment in isImportSymbolDeclaration in checker) Instantiated = 0x01000000, // Instantiated symbol Merged = 0x02000000, // Merged symbol (created during program binding) Transient = 0x04000000, // Transient symbol (created during type check)