TypeScript/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.types

29 lines
664 B
Plaintext
Raw Normal View History

2014-11-29 03:33:37 +01:00
=== tests/cases/compiler/collisionRestParameterUnderscoreIUsage.ts ===
declare var console: { log(msg?: string): void; };
>console : { log(msg?: string): void; }
>log : (msg?: string) => void
>msg : string
2014-11-29 03:33:37 +01:00
var _i = "This is what I'd expect to see";
>_i : string
2015-04-13 21:36:11 +02:00
>"This is what I'd expect to see" : string
2014-11-29 03:33:37 +01:00
class Foo {
>Foo : Foo
2014-11-29 03:33:37 +01:00
constructor(...args: any[]) {
>args : any[]
2014-11-29 03:33:37 +01:00
console.log(_i); // This should result in error
>console.log(_i) : void
>console.log : (msg?: string) => void
>console : { log(msg?: string): void; }
>log : (msg?: string) => void
>_i : string
2014-11-29 03:33:37 +01:00
}
}
new Foo();
>new Foo() : Foo
>Foo : typeof Foo
2014-11-29 03:33:37 +01:00