TypeScript/tests/baselines/reference/library_StringSlice.types

30 lines
950 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/library_StringSlice.ts ===
// String.prototype.slice can have zero, one, or two arguments
String.prototype.slice();
>String.prototype.slice() : string
>String.prototype.slice : (start?: number, end?: number) => string
>String.prototype : String
>String : StringConstructor
>prototype : String
>slice : (start?: number, end?: number) => string
2014-08-15 23:33:16 +02:00
String.prototype.slice(0);
>String.prototype.slice(0) : string
>String.prototype.slice : (start?: number, end?: number) => string
>String.prototype : String
>String : StringConstructor
>prototype : String
>slice : (start?: number, end?: number) => string
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
String.prototype.slice(0,1);
>String.prototype.slice(0,1) : string
>String.prototype.slice : (start?: number, end?: number) => string
>String.prototype : String
>String : StringConstructor
>prototype : String
>slice : (start?: number, end?: number) => string
2015-04-13 21:36:11 +02:00
>0 : number
>1 : number
2014-08-15 23:33:16 +02:00