TypeScript/tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts
Wesley Wigham 293816875c
Support some late-bound special property assignments (#33220)
* Support some late-bound special property assignments

* Integrate PR feedback

* PR feedback

* Enable declaration on core tests

* Specialize type of binary expression used for late binding, speculative fix to navigation bar, merge check and type for elem/property accesses

* Add test showing current nav bar behavior (specifically the lack thereof)
2019-09-27 13:54:50 -07:00

11 lines
210 B
TypeScript

// @declaration: true
// @target: es6
// @strict: true
// @filename: index.ts
export function foo() {}
foo.bar = 12;
const _private = Symbol();
foo[_private] = "ok";
const x: string = foo[_private];