TypeScript/tests/baselines/reference/enumMapBackIntoItself.types

32 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/enumMapBackIntoItself.ts ===
enum TShirtSize {
2015-04-13 23:01:57 +02:00
>TShirtSize : TShirtSize, Symbol(TShirtSize, Decl(enumMapBackIntoItself.ts, 0, 0))
2014-08-15 23:33:16 +02:00
Small,
2015-04-13 23:01:57 +02:00
>Small : TShirtSize, Symbol(TShirtSize.Small, Decl(enumMapBackIntoItself.ts, 0, 17))
2014-08-15 23:33:16 +02:00
Medium,
2015-04-13 23:01:57 +02:00
>Medium : TShirtSize, Symbol(TShirtSize.Medium, Decl(enumMapBackIntoItself.ts, 1, 9))
2014-08-15 23:33:16 +02:00
Large
2015-04-13 23:01:57 +02:00
>Large : TShirtSize, Symbol(TShirtSize.Large, Decl(enumMapBackIntoItself.ts, 2, 10))
2014-08-15 23:33:16 +02:00
}
var mySize = TShirtSize.Large;
2015-04-13 23:01:57 +02:00
>mySize : TShirtSize, Symbol(mySize, Decl(enumMapBackIntoItself.ts, 5, 3))
>TShirtSize.Large : TShirtSize, Symbol(TShirtSize.Large, Decl(enumMapBackIntoItself.ts, 2, 10))
>TShirtSize : typeof TShirtSize, Symbol(TShirtSize, Decl(enumMapBackIntoItself.ts, 0, 0))
>Large : TShirtSize, Symbol(TShirtSize.Large, Decl(enumMapBackIntoItself.ts, 2, 10))
2014-08-15 23:33:16 +02:00
var test = TShirtSize[mySize];
2015-04-13 23:01:57 +02:00
>test : string, Symbol(test, Decl(enumMapBackIntoItself.ts, 6, 3))
2014-08-15 23:33:16 +02:00
>TShirtSize[mySize] : string
2015-04-13 23:01:57 +02:00
>TShirtSize : typeof TShirtSize, Symbol(TShirtSize, Decl(enumMapBackIntoItself.ts, 0, 0))
>mySize : TShirtSize, Symbol(mySize, Decl(enumMapBackIntoItself.ts, 5, 3))
2014-08-15 23:33:16 +02:00
// specifically checking output here, bug was that test used to be undefined at runtime
test + ''
>test + '' : string
2015-04-13 23:01:57 +02:00
>test : string, Symbol(test, Decl(enumMapBackIntoItself.ts, 6, 3))
2015-04-13 21:36:11 +02:00
>'' : string
2014-08-15 23:33:16 +02:00