File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -56,3 +56,42 @@ var StringEnum;
56
56
( function ( StringEnum ) {
57
57
StringEnum . selected = StringEnum . Option1 ;
58
58
} ) ( StringEnum || ( StringEnum = { } ) ) ;
59
+
60
+
61
+ //// [enumNamespaceConstantsDeclaration.d.ts]
62
+ declare enum Foo {
63
+ bar = 0
64
+ }
65
+ declare namespace Foo {
66
+ const baz = Foo . bar ;
67
+ }
68
+ declare enum MyEnum {
69
+ First = 1 ,
70
+ Second = 2
71
+ }
72
+ declare namespace MyEnum {
73
+ const value1 = MyEnum . First ;
74
+ const value2 = MyEnum . Second ;
75
+ }
76
+ declare enum StringEnum {
77
+ Option1 = "option1" ,
78
+ Option2 = "option2"
79
+ }
80
+ declare namespace StringEnum {
81
+ const selected : any ;
82
+ }
83
+
84
+
85
+ ! ! ! ! File enumNamespaceConstantsDeclaration . d . ts differs from original emit in noCheck emit
86
+ //// [enumNamespaceConstantsDeclaration.d.ts]
87
+ === = === === === === === === === === === === === === === === === === === === === === ===
88
+ -- - Expected The full check baseline
89
+ ++ + Actual with noCheck set
90
+ @@ - 16 , 6 + 16 , 6 @@
91
+ Option1 = "option1" ,
92
+ Option2 = "option2"
93
+ }
94
+ declare namespace StringEnum {
95
+ - const selected: any ;
96
+ + const selected = StringEnum . Option1 ;
97
+ }
Original file line number Diff line number Diff line change
1
+ // @declaration : true
2
+
1
3
// Test for constant declarations inside namespace merged with enum
2
4
enum Foo {
3
5
bar
You can’t perform that action at this time.
0 commit comments