-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Module Dereference Path for TEnum * Version * ChangeLog
- Loading branch information
1 parent
ab4f0db
commit cc5f2a3
Showing
7 changed files
with
65 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Expect } from './assert' | ||
import { Type } from '@sinclair/typebox' | ||
|
||
// ------------------------------------------------------------------ | ||
// Enum 1 | ||
// ------------------------------------------------------------------ | ||
{ | ||
enum Enum { | ||
A, | ||
B, | ||
} | ||
|
||
const T = Type.Module({ | ||
T: Type.Object({ | ||
value: Type.Enum(Enum), | ||
}), | ||
}).Import('T') | ||
|
||
Expect(T).ToStatic<{ | ||
value: Enum | ||
}>() | ||
} | ||
|
||
// ------------------------------------------------------------------ | ||
// Enum 2 | ||
// ------------------------------------------------------------------ | ||
{ | ||
const T = Type.Module({ | ||
T: Type.Object({ | ||
value: Type.Enum({ | ||
x: 1, | ||
y: 2, | ||
}), | ||
}), | ||
}).Import('T') | ||
|
||
Expect(T).ToStatic<{ | ||
value: 1 | 2 | ||
}>() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters