diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 00d01ec950809..ab219aedf7a24 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1180,18 +1180,35 @@ namespace ts { fakespace.parent = enclosingDeclaration as SourceFile | NamespaceDeclaration; fakespace.locals = createSymbolTable(props); fakespace.symbol = props[0].parent!; - const declarations = mapDefined(props, p => { + const declarations = flatMap(props, p => { if (!isPropertyAccessExpression(p.valueDeclaration)) { return undefined; // TODO GH#33569: Handle element access expressions that created late bound names (rather than silently omitting them) } getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration); const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker); getSymbolAccessibilityDiagnostic = oldDiag; - const varDecl = createVariableDeclaration(unescapeLeadingUnderscores(p.escapedName), type, /*initializer*/ undefined); - return createVariableStatement(/*modifiers*/ undefined, createVariableDeclarationList([varDecl])); + const propName = unescapeLeadingUnderscores(p.escapedName); + if (isIdentifier(p.valueDeclaration.name) && + p.valueDeclaration.name.originalKeywordKind && + isKeyword(p.valueDeclaration.name.originalKeywordKind)) { + const name = createUniqueName(propName); + return [ + transformProperty(name, type), + createExportDeclaration( + /*decorators*/ undefined, + /*modifiers*/ undefined, + createNamedExports([createExportSpecifier(name, propName)])) + ]; + } + return transformProperty(propName, type); + + function transformProperty(name: string | Identifier, type: TypeNode | undefined) { + return createVariableStatement( + /*modifiers*/ undefined, + createVariableDeclarationList([createVariableDeclaration(name, type, /*initializer*/ undefined)])); + } }); const namespaceDecl = createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input), input.name!, createModuleBlock(declarations), NodeFlags.Namespace); - if (!hasEffectiveModifier(clean, ModifierFlags.Default)) { return [clean, namespaceDecl]; } diff --git a/tests/baselines/reference/nullPropertyName.js b/tests/baselines/reference/nullPropertyName.js new file mode 100644 index 0000000000000..8ab378259b573 --- /dev/null +++ b/tests/baselines/reference/nullPropertyName.js @@ -0,0 +1,327 @@ +//// [nullPropertyName.ts] +function foo() {} +// properties +foo.x = 1; +foo.y = 1; + +// keywords +foo.break = 1; +foo.case = 1; +foo.catch = 1; +foo.class = 1; +foo.const = 1; +foo.continue = 1; +foo.debugger = 1; +foo.default = 1; +foo.delete = 1; +foo.do = 1; +foo.else = 1; +foo.enum = 1; +foo.export = 1; +foo.extends = 1; +foo.false = 1; +foo.finally = 1; +foo.for = 1; +foo.function = 1; +foo.if = 1; +foo.import = 1; +foo.in = 1; +foo.instanceof = 1; +foo.new = 1; +foo.null = 1; +foo.return = 1; +foo.super = 1; +foo.switch = 1; +foo.this = 1; +foo.throw = 1; +foo.true = 1; +foo.try = 1; +foo.typeof = 1; +foo.var = 1; +foo.void = 1; +foo.while = 1; +foo.with = 1; +foo.implements = 1; +foo.interface = 1; +foo.let = 1; +foo.package = 1; +foo.private = 1; +foo.protected = 1; +foo.public = 1; +foo.static = 1; +foo.yield = 1; +foo.abstract = 1; +foo.as = 1; +foo.asserts = 1; +foo.any = 1; +foo.async = 1; +foo.await = 1; +foo.boolean = 1; +foo.constructor = 1; +foo.declare = 1; +foo.get = 1; +foo.infer = 1; +foo.is = 1; +foo.keyof = 1; +foo.module = 1; +foo.namespace = 1; +foo.never = 1; +foo.readonly = 1; +foo.require = 1; +foo.number = 1; +foo.object = 1; +foo.set = 1; +foo.string = 1; +foo.symbol = 1; +foo.type = 1; +foo.undefined = 1; +foo.unique = 1; +foo.unknown = 1; +foo.from = 1; +foo.global = 1; +foo.bigint = 1; +foo.of = 1; + + +//// [nullPropertyName.js] +function foo() { } +// properties +foo.x = 1; +foo.y = 1; +// keywords +foo["break"] = 1; +foo["case"] = 1; +foo["catch"] = 1; +foo["class"] = 1; +foo["const"] = 1; +foo["continue"] = 1; +foo["debugger"] = 1; +foo["default"] = 1; +foo["delete"] = 1; +foo["do"] = 1; +foo["else"] = 1; +foo["enum"] = 1; +foo["export"] = 1; +foo["extends"] = 1; +foo["false"] = 1; +foo["finally"] = 1; +foo["for"] = 1; +foo["function"] = 1; +foo["if"] = 1; +foo["import"] = 1; +foo["in"] = 1; +foo["instanceof"] = 1; +foo["new"] = 1; +foo["null"] = 1; +foo["return"] = 1; +foo["super"] = 1; +foo["switch"] = 1; +foo["this"] = 1; +foo["throw"] = 1; +foo["true"] = 1; +foo["try"] = 1; +foo["typeof"] = 1; +foo["var"] = 1; +foo["void"] = 1; +foo["while"] = 1; +foo["with"] = 1; +foo.implements = 1; +foo.interface = 1; +foo.let = 1; +foo.package = 1; +foo.private = 1; +foo.protected = 1; +foo.public = 1; +foo.static = 1; +foo.yield = 1; +foo.abstract = 1; +foo.as = 1; +foo.asserts = 1; +foo.any = 1; +foo.async = 1; +foo.await = 1; +foo.boolean = 1; +foo.constructor = 1; +foo.declare = 1; +foo.get = 1; +foo.infer = 1; +foo.is = 1; +foo.keyof = 1; +foo.module = 1; +foo.namespace = 1; +foo.never = 1; +foo.readonly = 1; +foo.require = 1; +foo.number = 1; +foo.object = 1; +foo.set = 1; +foo.string = 1; +foo.symbol = 1; +foo.type = 1; +foo.undefined = 1; +foo.unique = 1; +foo.unknown = 1; +foo.from = 1; +foo.global = 1; +foo.bigint = 1; +foo.of = 1; + + +//// [nullPropertyName.d.ts] +declare function foo(): void; +declare namespace foo { + var x: number; + var y: number; + var break_1: number; + export { break_1 as break }; + var case_1: number; + export { case_1 as case }; + var catch_1: number; + export { catch_1 as catch }; + var class_1: number; + export { class_1 as class }; + var const_1: number; + export { const_1 as const }; + var continue_1: number; + export { continue_1 as continue }; + var debugger_1: number; + export { debugger_1 as debugger }; + var default_1: number; + export { default_1 as default }; + var delete_1: number; + export { delete_1 as delete }; + var do_1: number; + export { do_1 as do }; + var else_1: number; + export { else_1 as else }; + var enum_1: number; + export { enum_1 as enum }; + var export_1: number; + export { export_1 as export }; + var extends_1: number; + export { extends_1 as extends }; + var false_1: number; + export { false_1 as false }; + var finally_1: number; + export { finally_1 as finally }; + var for_1: number; + export { for_1 as for }; + var function_1: number; + export { function_1 as function }; + var if_1: number; + export { if_1 as if }; + var import_1: number; + export { import_1 as import }; + var in_1: number; + export { in_1 as in }; + var instanceof_1: number; + export { instanceof_1 as instanceof }; + var new_1: number; + export { new_1 as new }; + var null_1: number; + export { null_1 as null }; + var return_1: number; + export { return_1 as return }; + var super_1: number; + export { super_1 as super }; + var switch_1: number; + export { switch_1 as switch }; + var this_1: number; + export { this_1 as this }; + var throw_1: number; + export { throw_1 as throw }; + var true_1: number; + export { true_1 as true }; + var try_1: number; + export { try_1 as try }; + var typeof_1: number; + export { typeof_1 as typeof }; + var var_1: number; + export { var_1 as var }; + var void_1: number; + export { void_1 as void }; + var while_1: number; + export { while_1 as while }; + var with_1: number; + export { with_1 as with }; + var implements_1: number; + export { implements_1 as implements }; + var interface_1: number; + export { interface_1 as interface }; + var let_1: number; + export { let_1 as let }; + var package_1: number; + export { package_1 as package }; + var private_1: number; + export { private_1 as private }; + var protected_1: number; + export { protected_1 as protected }; + var public_1: number; + export { public_1 as public }; + var static_1: number; + export { static_1 as static }; + var yield_1: number; + export { yield_1 as yield }; + var abstract_1: number; + export { abstract_1 as abstract }; + var as_1: number; + export { as_1 as as }; + var asserts_1: number; + export { asserts_1 as asserts }; + var any_1: number; + export { any_1 as any }; + var async_1: number; + export { async_1 as async }; + var await_1: number; + export { await_1 as await }; + var boolean_1: number; + export { boolean_1 as boolean }; + var constructor_1: number; + export { constructor_1 as constructor }; + var declare_1: number; + export { declare_1 as declare }; + var get_1: number; + export { get_1 as get }; + var infer_1: number; + export { infer_1 as infer }; + var is_1: number; + export { is_1 as is }; + var keyof_1: number; + export { keyof_1 as keyof }; + var module_1: number; + export { module_1 as module }; + var namespace_1: number; + export { namespace_1 as namespace }; + var never_1: number; + export { never_1 as never }; + var readonly_1: number; + export { readonly_1 as readonly }; + var require_1: number; + export { require_1 as require }; + var number_1: number; + export { number_1 as number }; + var object_1: number; + export { object_1 as object }; + var set_1: number; + export { set_1 as set }; + var string_1: number; + export { string_1 as string }; + var symbol_1: number; + export { symbol_1 as symbol }; + var type_1: number; + export { type_1 as type }; + var undefined_1: number; + export { undefined_1 as undefined }; + var unique_1: number; + export { unique_1 as unique }; + var unknown_1: number; + export { unknown_1 as unknown }; + var from_1: number; + export { from_1 as from }; + var global_1: number; + export { global_1 as global }; + var bigint_1: number; + export { bigint_1 as bigint }; + var of_1: number; + export { of_1 as of }; +} diff --git a/tests/baselines/reference/nullPropertyName.symbols b/tests/baselines/reference/nullPropertyName.symbols new file mode 100644 index 0000000000000..78602b568086d --- /dev/null +++ b/tests/baselines/reference/nullPropertyName.symbols @@ -0,0 +1,396 @@ +=== tests/cases/conformance/declarationEmit/nullPropertyName.ts === +function foo() {} +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) + +// properties +foo.x = 1; +>foo.x : Symbol(foo.x, Decl(nullPropertyName.ts, 0, 17)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>x : Symbol(foo.x, Decl(nullPropertyName.ts, 0, 17)) + +foo.y = 1; +>foo.y : Symbol(foo.y, Decl(nullPropertyName.ts, 2, 10)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>y : Symbol(foo.y, Decl(nullPropertyName.ts, 2, 10)) + +// keywords +foo.break = 1; +>foo.break : Symbol(foo.break, Decl(nullPropertyName.ts, 3, 10)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>break : Symbol(foo.break, Decl(nullPropertyName.ts, 3, 10)) + +foo.case = 1; +>foo.case : Symbol(foo.case, Decl(nullPropertyName.ts, 6, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>case : Symbol(foo.case, Decl(nullPropertyName.ts, 6, 14)) + +foo.catch = 1; +>foo.catch : Symbol(foo.catch, Decl(nullPropertyName.ts, 7, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>catch : Symbol(foo.catch, Decl(nullPropertyName.ts, 7, 13)) + +foo.class = 1; +>foo.class : Symbol(foo.class, Decl(nullPropertyName.ts, 8, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>class : Symbol(foo.class, Decl(nullPropertyName.ts, 8, 14)) + +foo.const = 1; +>foo.const : Symbol(foo.const, Decl(nullPropertyName.ts, 9, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>const : Symbol(foo.const, Decl(nullPropertyName.ts, 9, 14)) + +foo.continue = 1; +>foo.continue : Symbol(foo.continue, Decl(nullPropertyName.ts, 10, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>continue : Symbol(foo.continue, Decl(nullPropertyName.ts, 10, 14)) + +foo.debugger = 1; +>foo.debugger : Symbol(foo.debugger, Decl(nullPropertyName.ts, 11, 17)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>debugger : Symbol(foo.debugger, Decl(nullPropertyName.ts, 11, 17)) + +foo.default = 1; +>foo.default : Symbol(foo.default, Decl(nullPropertyName.ts, 12, 17)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>default : Symbol(foo.default, Decl(nullPropertyName.ts, 12, 17)) + +foo.delete = 1; +>foo.delete : Symbol(foo.delete, Decl(nullPropertyName.ts, 13, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>delete : Symbol(foo.delete, Decl(nullPropertyName.ts, 13, 16)) + +foo.do = 1; +>foo.do : Symbol(foo.do, Decl(nullPropertyName.ts, 14, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>do : Symbol(foo.do, Decl(nullPropertyName.ts, 14, 15)) + +foo.else = 1; +>foo.else : Symbol(foo.else, Decl(nullPropertyName.ts, 15, 11)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>else : Symbol(foo.else, Decl(nullPropertyName.ts, 15, 11)) + +foo.enum = 1; +>foo.enum : Symbol(foo.enum, Decl(nullPropertyName.ts, 16, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>enum : Symbol(foo.enum, Decl(nullPropertyName.ts, 16, 13)) + +foo.export = 1; +>foo.export : Symbol(foo.export, Decl(nullPropertyName.ts, 17, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>export : Symbol(foo.export, Decl(nullPropertyName.ts, 17, 13)) + +foo.extends = 1; +>foo.extends : Symbol(foo.extends, Decl(nullPropertyName.ts, 18, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>extends : Symbol(foo.extends, Decl(nullPropertyName.ts, 18, 15)) + +foo.false = 1; +>foo.false : Symbol(foo.false, Decl(nullPropertyName.ts, 19, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>false : Symbol(foo.false, Decl(nullPropertyName.ts, 19, 16)) + +foo.finally = 1; +>foo.finally : Symbol(foo.finally, Decl(nullPropertyName.ts, 20, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>finally : Symbol(foo.finally, Decl(nullPropertyName.ts, 20, 14)) + +foo.for = 1; +>foo.for : Symbol(foo.for, Decl(nullPropertyName.ts, 21, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>for : Symbol(foo.for, Decl(nullPropertyName.ts, 21, 16)) + +foo.function = 1; +>foo.function : Symbol(foo.function, Decl(nullPropertyName.ts, 22, 12)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>function : Symbol(foo.function, Decl(nullPropertyName.ts, 22, 12)) + +foo.if = 1; +>foo.if : Symbol(foo.if, Decl(nullPropertyName.ts, 23, 17)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>if : Symbol(foo.if, Decl(nullPropertyName.ts, 23, 17)) + +foo.import = 1; +>foo.import : Symbol(foo.import, Decl(nullPropertyName.ts, 24, 11)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>import : Symbol(foo.import, Decl(nullPropertyName.ts, 24, 11)) + +foo.in = 1; +>foo.in : Symbol(foo.in, Decl(nullPropertyName.ts, 25, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>in : Symbol(foo.in, Decl(nullPropertyName.ts, 25, 15)) + +foo.instanceof = 1; +>foo.instanceof : Symbol(foo.instanceof, Decl(nullPropertyName.ts, 26, 11)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>instanceof : Symbol(foo.instanceof, Decl(nullPropertyName.ts, 26, 11)) + +foo.new = 1; +>foo.new : Symbol(foo.new, Decl(nullPropertyName.ts, 27, 19)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>new : Symbol(foo.new, Decl(nullPropertyName.ts, 27, 19)) + +foo.null = 1; +>foo.null : Symbol(foo.null, Decl(nullPropertyName.ts, 28, 12)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>null : Symbol(foo.null, Decl(nullPropertyName.ts, 28, 12)) + +foo.return = 1; +>foo.return : Symbol(foo.return, Decl(nullPropertyName.ts, 29, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>return : Symbol(foo.return, Decl(nullPropertyName.ts, 29, 13)) + +foo.super = 1; +>foo.super : Symbol(foo.super, Decl(nullPropertyName.ts, 30, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>super : Symbol(foo.super, Decl(nullPropertyName.ts, 30, 15)) + +foo.switch = 1; +>foo.switch : Symbol(foo.switch, Decl(nullPropertyName.ts, 31, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>switch : Symbol(foo.switch, Decl(nullPropertyName.ts, 31, 14)) + +foo.this = 1; +>foo.this : Symbol(foo.this, Decl(nullPropertyName.ts, 32, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>this : Symbol(foo.this, Decl(nullPropertyName.ts, 32, 15)) + +foo.throw = 1; +>foo.throw : Symbol(foo.throw, Decl(nullPropertyName.ts, 33, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>throw : Symbol(foo.throw, Decl(nullPropertyName.ts, 33, 13)) + +foo.true = 1; +>foo.true : Symbol(foo.true, Decl(nullPropertyName.ts, 34, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>true : Symbol(foo.true, Decl(nullPropertyName.ts, 34, 14)) + +foo.try = 1; +>foo.try : Symbol(foo.try, Decl(nullPropertyName.ts, 35, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>try : Symbol(foo.try, Decl(nullPropertyName.ts, 35, 13)) + +foo.typeof = 1; +>foo.typeof : Symbol(foo.typeof, Decl(nullPropertyName.ts, 36, 12)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>typeof : Symbol(foo.typeof, Decl(nullPropertyName.ts, 36, 12)) + +foo.var = 1; +>foo.var : Symbol(foo.var, Decl(nullPropertyName.ts, 37, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>var : Symbol(foo.var, Decl(nullPropertyName.ts, 37, 15)) + +foo.void = 1; +>foo.void : Symbol(foo.void, Decl(nullPropertyName.ts, 38, 12)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>void : Symbol(foo.void, Decl(nullPropertyName.ts, 38, 12)) + +foo.while = 1; +>foo.while : Symbol(foo.while, Decl(nullPropertyName.ts, 39, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>while : Symbol(foo.while, Decl(nullPropertyName.ts, 39, 13)) + +foo.with = 1; +>foo.with : Symbol(foo.with, Decl(nullPropertyName.ts, 40, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>with : Symbol(foo.with, Decl(nullPropertyName.ts, 40, 14)) + +foo.implements = 1; +>foo.implements : Symbol(foo.implements, Decl(nullPropertyName.ts, 41, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>implements : Symbol(foo.implements, Decl(nullPropertyName.ts, 41, 13)) + +foo.interface = 1; +>foo.interface : Symbol(foo.interface, Decl(nullPropertyName.ts, 42, 19)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>interface : Symbol(foo.interface, Decl(nullPropertyName.ts, 42, 19)) + +foo.let = 1; +>foo.let : Symbol(foo.let, Decl(nullPropertyName.ts, 43, 18)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>let : Symbol(foo.let, Decl(nullPropertyName.ts, 43, 18)) + +foo.package = 1; +>foo.package : Symbol(foo.package, Decl(nullPropertyName.ts, 44, 12)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>package : Symbol(foo.package, Decl(nullPropertyName.ts, 44, 12)) + +foo.private = 1; +>foo.private : Symbol(foo.private, Decl(nullPropertyName.ts, 45, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>private : Symbol(foo.private, Decl(nullPropertyName.ts, 45, 16)) + +foo.protected = 1; +>foo.protected : Symbol(foo.protected, Decl(nullPropertyName.ts, 46, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>protected : Symbol(foo.protected, Decl(nullPropertyName.ts, 46, 16)) + +foo.public = 1; +>foo.public : Symbol(foo.public, Decl(nullPropertyName.ts, 47, 18)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>public : Symbol(foo.public, Decl(nullPropertyName.ts, 47, 18)) + +foo.static = 1; +>foo.static : Symbol(foo.static, Decl(nullPropertyName.ts, 48, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>static : Symbol(foo.static, Decl(nullPropertyName.ts, 48, 15)) + +foo.yield = 1; +>foo.yield : Symbol(foo.yield, Decl(nullPropertyName.ts, 49, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>yield : Symbol(foo.yield, Decl(nullPropertyName.ts, 49, 15)) + +foo.abstract = 1; +>foo.abstract : Symbol(foo.abstract, Decl(nullPropertyName.ts, 50, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>abstract : Symbol(foo.abstract, Decl(nullPropertyName.ts, 50, 14)) + +foo.as = 1; +>foo.as : Symbol(foo.as, Decl(nullPropertyName.ts, 51, 17)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>as : Symbol(foo.as, Decl(nullPropertyName.ts, 51, 17)) + +foo.asserts = 1; +>foo.asserts : Symbol(foo.asserts, Decl(nullPropertyName.ts, 52, 11)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>asserts : Symbol(foo.asserts, Decl(nullPropertyName.ts, 52, 11)) + +foo.any = 1; +>foo.any : Symbol(foo.any, Decl(nullPropertyName.ts, 53, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>any : Symbol(foo.any, Decl(nullPropertyName.ts, 53, 16)) + +foo.async = 1; +>foo.async : Symbol(foo.async, Decl(nullPropertyName.ts, 54, 12)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>async : Symbol(foo.async, Decl(nullPropertyName.ts, 54, 12)) + +foo.await = 1; +>foo.await : Symbol(foo.await, Decl(nullPropertyName.ts, 55, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>await : Symbol(foo.await, Decl(nullPropertyName.ts, 55, 14)) + +foo.boolean = 1; +>foo.boolean : Symbol(foo.boolean, Decl(nullPropertyName.ts, 56, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>boolean : Symbol(foo.boolean, Decl(nullPropertyName.ts, 56, 14)) + +foo.constructor = 1; +>foo.constructor : Symbol(foo.constructor, Decl(nullPropertyName.ts, 57, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>constructor : Symbol(foo.constructor, Decl(nullPropertyName.ts, 57, 16)) + +foo.declare = 1; +>foo.declare : Symbol(foo.declare, Decl(nullPropertyName.ts, 58, 20)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>declare : Symbol(foo.declare, Decl(nullPropertyName.ts, 58, 20)) + +foo.get = 1; +>foo.get : Symbol(foo.get, Decl(nullPropertyName.ts, 59, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>get : Symbol(foo.get, Decl(nullPropertyName.ts, 59, 16)) + +foo.infer = 1; +>foo.infer : Symbol(foo.infer, Decl(nullPropertyName.ts, 60, 12)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>infer : Symbol(foo.infer, Decl(nullPropertyName.ts, 60, 12)) + +foo.is = 1; +>foo.is : Symbol(foo.is, Decl(nullPropertyName.ts, 61, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>is : Symbol(foo.is, Decl(nullPropertyName.ts, 61, 14)) + +foo.keyof = 1; +>foo.keyof : Symbol(foo.keyof, Decl(nullPropertyName.ts, 62, 11)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>keyof : Symbol(foo.keyof, Decl(nullPropertyName.ts, 62, 11)) + +foo.module = 1; +>foo.module : Symbol(foo.module, Decl(nullPropertyName.ts, 63, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>module : Symbol(foo.module, Decl(nullPropertyName.ts, 63, 14)) + +foo.namespace = 1; +>foo.namespace : Symbol(foo.namespace, Decl(nullPropertyName.ts, 64, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>namespace : Symbol(foo.namespace, Decl(nullPropertyName.ts, 64, 15)) + +foo.never = 1; +>foo.never : Symbol(foo.never, Decl(nullPropertyName.ts, 65, 18)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>never : Symbol(foo.never, Decl(nullPropertyName.ts, 65, 18)) + +foo.readonly = 1; +>foo.readonly : Symbol(foo.readonly, Decl(nullPropertyName.ts, 66, 14)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>readonly : Symbol(foo.readonly, Decl(nullPropertyName.ts, 66, 14)) + +foo.require = 1; +>foo.require : Symbol(foo.require, Decl(nullPropertyName.ts, 67, 17)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>require : Symbol(foo.require, Decl(nullPropertyName.ts, 67, 17)) + +foo.number = 1; +>foo.number : Symbol(foo.number, Decl(nullPropertyName.ts, 68, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>number : Symbol(foo.number, Decl(nullPropertyName.ts, 68, 16)) + +foo.object = 1; +>foo.object : Symbol(foo.object, Decl(nullPropertyName.ts, 69, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>object : Symbol(foo.object, Decl(nullPropertyName.ts, 69, 15)) + +foo.set = 1; +>foo.set : Symbol(foo.set, Decl(nullPropertyName.ts, 70, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>set : Symbol(foo.set, Decl(nullPropertyName.ts, 70, 15)) + +foo.string = 1; +>foo.string : Symbol(foo.string, Decl(nullPropertyName.ts, 71, 12)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>string : Symbol(foo.string, Decl(nullPropertyName.ts, 71, 12)) + +foo.symbol = 1; +>foo.symbol : Symbol(foo.symbol, Decl(nullPropertyName.ts, 72, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>symbol : Symbol(foo.symbol, Decl(nullPropertyName.ts, 72, 15)) + +foo.type = 1; +>foo.type : Symbol(foo.type, Decl(nullPropertyName.ts, 73, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>type : Symbol(foo.type, Decl(nullPropertyName.ts, 73, 15)) + +foo.undefined = 1; +>foo.undefined : Symbol(foo.undefined, Decl(nullPropertyName.ts, 74, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>undefined : Symbol(foo.undefined, Decl(nullPropertyName.ts, 74, 13)) + +foo.unique = 1; +>foo.unique : Symbol(foo.unique, Decl(nullPropertyName.ts, 75, 18)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>unique : Symbol(foo.unique, Decl(nullPropertyName.ts, 75, 18)) + +foo.unknown = 1; +>foo.unknown : Symbol(foo.unknown, Decl(nullPropertyName.ts, 76, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>unknown : Symbol(foo.unknown, Decl(nullPropertyName.ts, 76, 15)) + +foo.from = 1; +>foo.from : Symbol(foo.from, Decl(nullPropertyName.ts, 77, 16)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>from : Symbol(foo.from, Decl(nullPropertyName.ts, 77, 16)) + +foo.global = 1; +>foo.global : Symbol(foo.global, Decl(nullPropertyName.ts, 78, 13)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>global : Symbol(foo.global, Decl(nullPropertyName.ts, 78, 13)) + +foo.bigint = 1; +>foo.bigint : Symbol(foo.bigint, Decl(nullPropertyName.ts, 79, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>bigint : Symbol(foo.bigint, Decl(nullPropertyName.ts, 79, 15)) + +foo.of = 1; +>foo.of : Symbol(foo.of, Decl(nullPropertyName.ts, 80, 15)) +>foo : Symbol(foo, Decl(nullPropertyName.ts, 0, 0), Decl(nullPropertyName.ts, 0, 17), Decl(nullPropertyName.ts, 2, 10), Decl(nullPropertyName.ts, 3, 10), Decl(nullPropertyName.ts, 6, 14) ... and 74 more) +>of : Symbol(foo.of, Decl(nullPropertyName.ts, 80, 15)) + diff --git a/tests/baselines/reference/nullPropertyName.types b/tests/baselines/reference/nullPropertyName.types new file mode 100644 index 0000000000000..b2acc69565866 --- /dev/null +++ b/tests/baselines/reference/nullPropertyName.types @@ -0,0 +1,552 @@ +=== tests/cases/conformance/declarationEmit/nullPropertyName.ts === +function foo() {} +>foo : typeof foo + +// properties +foo.x = 1; +>foo.x = 1 : 1 +>foo.x : number +>foo : typeof foo +>x : number +>1 : 1 + +foo.y = 1; +>foo.y = 1 : 1 +>foo.y : number +>foo : typeof foo +>y : number +>1 : 1 + +// keywords +foo.break = 1; +>foo.break = 1 : 1 +>foo.break : number +>foo : typeof foo +>break : number +>1 : 1 + +foo.case = 1; +>foo.case = 1 : 1 +>foo.case : number +>foo : typeof foo +>case : number +>1 : 1 + +foo.catch = 1; +>foo.catch = 1 : 1 +>foo.catch : number +>foo : typeof foo +>catch : number +>1 : 1 + +foo.class = 1; +>foo.class = 1 : 1 +>foo.class : number +>foo : typeof foo +>class : number +>1 : 1 + +foo.const = 1; +>foo.const = 1 : 1 +>foo.const : number +>foo : typeof foo +>const : number +>1 : 1 + +foo.continue = 1; +>foo.continue = 1 : 1 +>foo.continue : number +>foo : typeof foo +>continue : number +>1 : 1 + +foo.debugger = 1; +>foo.debugger = 1 : 1 +>foo.debugger : number +>foo : typeof foo +>debugger : number +>1 : 1 + +foo.default = 1; +>foo.default = 1 : 1 +>foo.default : number +>foo : typeof foo +>default : number +>1 : 1 + +foo.delete = 1; +>foo.delete = 1 : 1 +>foo.delete : number +>foo : typeof foo +>delete : number +>1 : 1 + +foo.do = 1; +>foo.do = 1 : 1 +>foo.do : number +>foo : typeof foo +>do : number +>1 : 1 + +foo.else = 1; +>foo.else = 1 : 1 +>foo.else : number +>foo : typeof foo +>else : number +>1 : 1 + +foo.enum = 1; +>foo.enum = 1 : 1 +>foo.enum : number +>foo : typeof foo +>enum : number +>1 : 1 + +foo.export = 1; +>foo.export = 1 : 1 +>foo.export : number +>foo : typeof foo +>export : number +>1 : 1 + +foo.extends = 1; +>foo.extends = 1 : 1 +>foo.extends : number +>foo : typeof foo +>extends : number +>1 : 1 + +foo.false = 1; +>foo.false = 1 : 1 +>foo.false : number +>foo : typeof foo +>false : number +>1 : 1 + +foo.finally = 1; +>foo.finally = 1 : 1 +>foo.finally : number +>foo : typeof foo +>finally : number +>1 : 1 + +foo.for = 1; +>foo.for = 1 : 1 +>foo.for : number +>foo : typeof foo +>for : number +>1 : 1 + +foo.function = 1; +>foo.function = 1 : 1 +>foo.function : number +>foo : typeof foo +>function : number +>1 : 1 + +foo.if = 1; +>foo.if = 1 : 1 +>foo.if : number +>foo : typeof foo +>if : number +>1 : 1 + +foo.import = 1; +>foo.import = 1 : 1 +>foo.import : number +>foo : typeof foo +>import : number +>1 : 1 + +foo.in = 1; +>foo.in = 1 : 1 +>foo.in : number +>foo : typeof foo +>in : number +>1 : 1 + +foo.instanceof = 1; +>foo.instanceof = 1 : 1 +>foo.instanceof : number +>foo : typeof foo +>instanceof : number +>1 : 1 + +foo.new = 1; +>foo.new = 1 : 1 +>foo.new : number +>foo : typeof foo +>new : number +>1 : 1 + +foo.null = 1; +>foo.null = 1 : 1 +>foo.null : number +>foo : typeof foo +>null : number +>1 : 1 + +foo.return = 1; +>foo.return = 1 : 1 +>foo.return : number +>foo : typeof foo +>return : number +>1 : 1 + +foo.super = 1; +>foo.super = 1 : 1 +>foo.super : number +>foo : typeof foo +>super : number +>1 : 1 + +foo.switch = 1; +>foo.switch = 1 : 1 +>foo.switch : number +>foo : typeof foo +>switch : number +>1 : 1 + +foo.this = 1; +>foo.this = 1 : 1 +>foo.this : number +>foo : typeof foo +>this : number +>1 : 1 + +foo.throw = 1; +>foo.throw = 1 : 1 +>foo.throw : number +>foo : typeof foo +>throw : number +>1 : 1 + +foo.true = 1; +>foo.true = 1 : 1 +>foo.true : number +>foo : typeof foo +>true : number +>1 : 1 + +foo.try = 1; +>foo.try = 1 : 1 +>foo.try : number +>foo : typeof foo +>try : number +>1 : 1 + +foo.typeof = 1; +>foo.typeof = 1 : 1 +>foo.typeof : number +>foo : typeof foo +>typeof : number +>1 : 1 + +foo.var = 1; +>foo.var = 1 : 1 +>foo.var : number +>foo : typeof foo +>var : number +>1 : 1 + +foo.void = 1; +>foo.void = 1 : 1 +>foo.void : number +>foo : typeof foo +>void : number +>1 : 1 + +foo.while = 1; +>foo.while = 1 : 1 +>foo.while : number +>foo : typeof foo +>while : number +>1 : 1 + +foo.with = 1; +>foo.with = 1 : 1 +>foo.with : number +>foo : typeof foo +>with : number +>1 : 1 + +foo.implements = 1; +>foo.implements = 1 : 1 +>foo.implements : number +>foo : typeof foo +>implements : number +>1 : 1 + +foo.interface = 1; +>foo.interface = 1 : 1 +>foo.interface : number +>foo : typeof foo +>interface : number +>1 : 1 + +foo.let = 1; +>foo.let = 1 : 1 +>foo.let : number +>foo : typeof foo +>let : number +>1 : 1 + +foo.package = 1; +>foo.package = 1 : 1 +>foo.package : number +>foo : typeof foo +>package : number +>1 : 1 + +foo.private = 1; +>foo.private = 1 : 1 +>foo.private : number +>foo : typeof foo +>private : number +>1 : 1 + +foo.protected = 1; +>foo.protected = 1 : 1 +>foo.protected : number +>foo : typeof foo +>protected : number +>1 : 1 + +foo.public = 1; +>foo.public = 1 : 1 +>foo.public : number +>foo : typeof foo +>public : number +>1 : 1 + +foo.static = 1; +>foo.static = 1 : 1 +>foo.static : number +>foo : typeof foo +>static : number +>1 : 1 + +foo.yield = 1; +>foo.yield = 1 : 1 +>foo.yield : number +>foo : typeof foo +>yield : number +>1 : 1 + +foo.abstract = 1; +>foo.abstract = 1 : 1 +>foo.abstract : number +>foo : typeof foo +>abstract : number +>1 : 1 + +foo.as = 1; +>foo.as = 1 : 1 +>foo.as : number +>foo : typeof foo +>as : number +>1 : 1 + +foo.asserts = 1; +>foo.asserts = 1 : 1 +>foo.asserts : number +>foo : typeof foo +>asserts : number +>1 : 1 + +foo.any = 1; +>foo.any = 1 : 1 +>foo.any : number +>foo : typeof foo +>any : number +>1 : 1 + +foo.async = 1; +>foo.async = 1 : 1 +>foo.async : number +>foo : typeof foo +>async : number +>1 : 1 + +foo.await = 1; +>foo.await = 1 : 1 +>foo.await : number +>foo : typeof foo +>await : number +>1 : 1 + +foo.boolean = 1; +>foo.boolean = 1 : 1 +>foo.boolean : number +>foo : typeof foo +>boolean : number +>1 : 1 + +foo.constructor = 1; +>foo.constructor = 1 : 1 +>foo.constructor : number +>foo : typeof foo +>constructor : number +>1 : 1 + +foo.declare = 1; +>foo.declare = 1 : 1 +>foo.declare : number +>foo : typeof foo +>declare : number +>1 : 1 + +foo.get = 1; +>foo.get = 1 : 1 +>foo.get : number +>foo : typeof foo +>get : number +>1 : 1 + +foo.infer = 1; +>foo.infer = 1 : 1 +>foo.infer : number +>foo : typeof foo +>infer : number +>1 : 1 + +foo.is = 1; +>foo.is = 1 : 1 +>foo.is : number +>foo : typeof foo +>is : number +>1 : 1 + +foo.keyof = 1; +>foo.keyof = 1 : 1 +>foo.keyof : number +>foo : typeof foo +>keyof : number +>1 : 1 + +foo.module = 1; +>foo.module = 1 : 1 +>foo.module : number +>foo : typeof foo +>module : number +>1 : 1 + +foo.namespace = 1; +>foo.namespace = 1 : 1 +>foo.namespace : number +>foo : typeof foo +>namespace : number +>1 : 1 + +foo.never = 1; +>foo.never = 1 : 1 +>foo.never : number +>foo : typeof foo +>never : number +>1 : 1 + +foo.readonly = 1; +>foo.readonly = 1 : 1 +>foo.readonly : number +>foo : typeof foo +>readonly : number +>1 : 1 + +foo.require = 1; +>foo.require = 1 : 1 +>foo.require : number +>foo : typeof foo +>require : number +>1 : 1 + +foo.number = 1; +>foo.number = 1 : 1 +>foo.number : number +>foo : typeof foo +>number : number +>1 : 1 + +foo.object = 1; +>foo.object = 1 : 1 +>foo.object : number +>foo : typeof foo +>object : number +>1 : 1 + +foo.set = 1; +>foo.set = 1 : 1 +>foo.set : number +>foo : typeof foo +>set : number +>1 : 1 + +foo.string = 1; +>foo.string = 1 : 1 +>foo.string : number +>foo : typeof foo +>string : number +>1 : 1 + +foo.symbol = 1; +>foo.symbol = 1 : 1 +>foo.symbol : number +>foo : typeof foo +>symbol : number +>1 : 1 + +foo.type = 1; +>foo.type = 1 : 1 +>foo.type : number +>foo : typeof foo +>type : number +>1 : 1 + +foo.undefined = 1; +>foo.undefined = 1 : 1 +>foo.undefined : number +>foo : typeof foo +>undefined : number +>1 : 1 + +foo.unique = 1; +>foo.unique = 1 : 1 +>foo.unique : number +>foo : typeof foo +>unique : number +>1 : 1 + +foo.unknown = 1; +>foo.unknown = 1 : 1 +>foo.unknown : number +>foo : typeof foo +>unknown : number +>1 : 1 + +foo.from = 1; +>foo.from = 1 : 1 +>foo.from : number +>foo : typeof foo +>from : number +>1 : 1 + +foo.global = 1; +>foo.global = 1 : 1 +>foo.global : number +>foo : typeof foo +>global : number +>1 : 1 + +foo.bigint = 1; +>foo.bigint = 1 : 1 +>foo.bigint : number +>foo : typeof foo +>bigint : number +>1 : 1 + +foo.of = 1; +>foo.of = 1 : 1 +>foo.of : number +>foo : typeof foo +>of : number +>1 : 1 + diff --git a/tests/cases/conformance/declarationEmit/nullPropertyName.ts b/tests/cases/conformance/declarationEmit/nullPropertyName.ts new file mode 100644 index 0000000000000..fb0b6ae0fb0e2 --- /dev/null +++ b/tests/cases/conformance/declarationEmit/nullPropertyName.ts @@ -0,0 +1,84 @@ +// @declaration: true + +function foo() {} +// properties +foo.x = 1; +foo.y = 1; + +// keywords +foo.break = 1; +foo.case = 1; +foo.catch = 1; +foo.class = 1; +foo.const = 1; +foo.continue = 1; +foo.debugger = 1; +foo.default = 1; +foo.delete = 1; +foo.do = 1; +foo.else = 1; +foo.enum = 1; +foo.export = 1; +foo.extends = 1; +foo.false = 1; +foo.finally = 1; +foo.for = 1; +foo.function = 1; +foo.if = 1; +foo.import = 1; +foo.in = 1; +foo.instanceof = 1; +foo.new = 1; +foo.null = 1; +foo.return = 1; +foo.super = 1; +foo.switch = 1; +foo.this = 1; +foo.throw = 1; +foo.true = 1; +foo.try = 1; +foo.typeof = 1; +foo.var = 1; +foo.void = 1; +foo.while = 1; +foo.with = 1; +foo.implements = 1; +foo.interface = 1; +foo.let = 1; +foo.package = 1; +foo.private = 1; +foo.protected = 1; +foo.public = 1; +foo.static = 1; +foo.yield = 1; +foo.abstract = 1; +foo.as = 1; +foo.asserts = 1; +foo.any = 1; +foo.async = 1; +foo.await = 1; +foo.boolean = 1; +foo.constructor = 1; +foo.declare = 1; +foo.get = 1; +foo.infer = 1; +foo.is = 1; +foo.keyof = 1; +foo.module = 1; +foo.namespace = 1; +foo.never = 1; +foo.readonly = 1; +foo.require = 1; +foo.number = 1; +foo.object = 1; +foo.set = 1; +foo.string = 1; +foo.symbol = 1; +foo.type = 1; +foo.undefined = 1; +foo.unique = 1; +foo.unknown = 1; +foo.from = 1; +foo.global = 1; +foo.bigint = 1; +foo.of = 1;