mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
29 lines
1.7 KiB
Plaintext
29 lines
1.7 KiB
Plaintext
lateBoundClassMemberAssignmentJS2.js(4,9): error TS7053: Element implicitly has an 'any' type because expression of type '"my-fake-sym"' can't be used to index type 'MyClass'.
|
|
Property 'my-fake-sym' does not exist on type 'MyClass'.
|
|
lateBoundClassMemberAssignmentJS2.js(8,9): error TS7053: Element implicitly has an 'any' type because expression of type '"my-fake-sym"' can't be used to index type 'MyClass'.
|
|
Property 'my-fake-sym' does not exist on type 'MyClass'.
|
|
lateBoundClassMemberAssignmentJS2.js(9,19): error TS7053: Element implicitly has an 'any' type because expression of type '"my-fake-sym"' can't be used to index type 'MyClass'.
|
|
Property 'my-fake-sym' does not exist on type 'MyClass'.
|
|
|
|
|
|
==== lateBoundClassMemberAssignmentJS2.js (3 errors) ====
|
|
const _sym = "my-fake-sym";
|
|
export class MyClass {
|
|
constructor() {
|
|
this[_sym] = "ok";
|
|
~~~~~~~~~~
|
|
!!! error TS7053: Element implicitly has an 'any' type because expression of type '"my-fake-sym"' can't be used to index type 'MyClass'.
|
|
!!! error TS7053: Property 'my-fake-sym' does not exist on type 'MyClass'.
|
|
}
|
|
|
|
method() {
|
|
this[_sym] = "yep";
|
|
~~~~~~~~~~
|
|
!!! error TS7053: Element implicitly has an 'any' type because expression of type '"my-fake-sym"' can't be used to index type 'MyClass'.
|
|
!!! error TS7053: Property 'my-fake-sym' does not exist on type 'MyClass'.
|
|
const x = this[_sym];
|
|
~~~~~~~~~~
|
|
!!! error TS7053: Element implicitly has an 'any' type because expression of type '"my-fake-sym"' can't be used to index type 'MyClass'.
|
|
!!! error TS7053: Property 'my-fake-sym' does not exist on type 'MyClass'.
|
|
}
|
|
} |