TypeScript/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.types
2015-04-15 16:44:20 -07:00

29 lines
664 B
Plaintext

=== tests/cases/compiler/collisionRestParameterUnderscoreIUsage.ts ===
declare var console: { log(msg?: string): void; };
>console : { log(msg?: string): void; }
>log : (msg?: string) => void
>msg : string
var _i = "This is what I'd expect to see";
>_i : string
>"This is what I'd expect to see" : string
class Foo {
>Foo : Foo
constructor(...args: any[]) {
>args : any[]
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
}
}
new Foo();
>new Foo() : Foo
>Foo : typeof Foo