mirror of
https://github.com/voson-wang/toon.git
synced 2026-01-29 23:34:10 +08:00
chore: initial commit
This commit is contained in:
20
src/types.ts
Normal file
20
src/types.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
// #region JSON types
|
||||
|
||||
export type JsonPrimitive = string | number | boolean | null
|
||||
export type JsonObject = { [Key in string]: JsonValue } & { [Key in string]?: JsonValue | undefined }
|
||||
export type JsonArray = JsonValue[] | readonly JsonValue[]
|
||||
export type JsonValue = JsonPrimitive | JsonObject | JsonArray
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Encoder options
|
||||
|
||||
export interface EncodeOptions {
|
||||
indent?: number
|
||||
}
|
||||
|
||||
export type ResolvedEncodeOptions = Readonly<Required<EncodeOptions>>
|
||||
|
||||
// #endregion
|
||||
|
||||
export type Depth = number
|
||||
Reference in New Issue
Block a user