Publish
This commit is contained in:
18
test/static/modifier.ts
Normal file
18
test/static/modifier.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Expect } from './assert'
|
||||
import { Type, TSchema } from '@sinclair/typebox'
|
||||
|
||||
// Asserts combinatory modifiers
|
||||
{
|
||||
const T = Type.Object({
|
||||
A: Type.ReadonlyOptional(Type.String()),
|
||||
B: Type.Readonly(Type.String()),
|
||||
C: Type.Optional(Type.String()),
|
||||
D: Type.String(),
|
||||
})
|
||||
Expect(T).ToStatic<{
|
||||
readonly A?: string
|
||||
readonly B: string
|
||||
C?: string
|
||||
D: string
|
||||
}>()
|
||||
}
|
||||
Reference in New Issue
Block a user