mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
57 lines
2.3 KiB
Plaintext
57 lines
2.3 KiB
Plaintext
expandoFunctionNestedAssigments.ts(7,23): error TS2339: Property 'inNestedFunction' does not exist on type '{ (): void; inVariableInit: number; bla: { foo: number; }; baz: number; bar: number; fromIf: number; inIf: number; fromWhileCondition: number; fromWhileBody: number; fromWhileBodyNested: number; fromDoBody: number; fromDoBodyNested: number; fromDoCondition: number; forInit: number; forCond: number; forIncr: number; fromForBody: number; fromForBodyNested: number; forOf: any[]; fromForOfBody: number; fromForOfBodyNested: number; forIn: any[]; fromForInBody: number; fromForInBodyNested: number; }'.
|
|
|
|
|
|
==== expandoFunctionNestedAssigments.ts (1 errors) ====
|
|
function Foo(): void {
|
|
|
|
}
|
|
let d: number = (Foo.inVariableInit = 1);
|
|
|
|
|
|
function bar(p = (Foo.inNestedFunction = 1)) {
|
|
~~~~~~~~~~~~~~~~
|
|
!!! error TS2339: Property 'inNestedFunction' does not exist on type '{ (): void; inVariableInit: number; bla: { foo: number; }; baz: number; bar: number; fromIf: number; inIf: number; fromWhileCondition: number; fromWhileBody: number; fromWhileBodyNested: number; fromDoBody: number; fromDoBodyNested: number; fromDoCondition: number; forInit: number; forCond: number; forIncr: number; fromForBody: number; fromForBodyNested: number; forOf: any[]; fromForOfBody: number; fromForOfBodyNested: number; forIn: any[]; fromForInBody: number; fromForInBodyNested: number; }'.
|
|
|
|
}
|
|
|
|
(Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0);
|
|
|
|
if(Foo.fromIf = 1) {
|
|
Foo.inIf = 1;
|
|
}
|
|
|
|
while(Foo.fromWhileCondition = 1) {
|
|
Foo.fromWhileBody = 1;
|
|
{
|
|
Foo.fromWhileBodyNested = 1;
|
|
}
|
|
}
|
|
|
|
do {
|
|
Foo.fromDoBody = 1;
|
|
{
|
|
Foo.fromDoBodyNested = 1;
|
|
}
|
|
} while(Foo.fromDoCondition = 1);
|
|
|
|
for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){
|
|
Foo.fromForBody = 1;
|
|
{
|
|
Foo.fromForBodyNested = 1;
|
|
}
|
|
}
|
|
|
|
for(let f of (Foo.forOf = []) ){
|
|
Foo.fromForOfBody = 1;
|
|
{
|
|
Foo.fromForOfBodyNested = 1;
|
|
}
|
|
}
|
|
|
|
|
|
for(let f in (Foo.forIn = []) ){
|
|
Foo.fromForInBody = 1;
|
|
{
|
|
Foo.fromForInBodyNested = 1;
|
|
}
|
|
} |