mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Fix test to properly check declaration output and remove invalid .d.ts file
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
This commit is contained in:
parent
5971e08b33
commit
64358a26e1
@ -56,3 +56,42 @@ var StringEnum;
|
||||
(function (StringEnum) {
|
||||
StringEnum.selected = StringEnum.Option1;
|
||||
})(StringEnum || (StringEnum = {}));
|
||||
|
||||
|
||||
//// [enumNamespaceConstantsDeclaration.d.ts]
|
||||
declare enum Foo {
|
||||
bar = 0
|
||||
}
|
||||
declare namespace Foo {
|
||||
const baz = Foo.bar;
|
||||
}
|
||||
declare enum MyEnum {
|
||||
First = 1,
|
||||
Second = 2
|
||||
}
|
||||
declare namespace MyEnum {
|
||||
const value1 = MyEnum.First;
|
||||
const value2 = MyEnum.Second;
|
||||
}
|
||||
declare enum StringEnum {
|
||||
Option1 = "option1",
|
||||
Option2 = "option2"
|
||||
}
|
||||
declare namespace StringEnum {
|
||||
const selected: any;
|
||||
}
|
||||
|
||||
|
||||
!!!! File enumNamespaceConstantsDeclaration.d.ts differs from original emit in noCheck emit
|
||||
//// [enumNamespaceConstantsDeclaration.d.ts]
|
||||
===================================================================
|
||||
--- Expected The full check baseline
|
||||
+++ Actual with noCheck set
|
||||
@@ -16,6 +16,6 @@
|
||||
Option1 = "option1",
|
||||
Option2 = "option2"
|
||||
}
|
||||
declare namespace StringEnum {
|
||||
- const selected: any;
|
||||
+ const selected = StringEnum.Option1;
|
||||
}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// @declaration: true
|
||||
|
||||
// Test for constant declarations inside namespace merged with enum
|
||||
enum Foo {
|
||||
bar
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user