Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 058975d064bd98963dae308770d17cb4eefe26c6 Author: skarab42 <skarab@bluewin.ch> Date: Sun Mar 13 05:58:44 2022 +0100 add infer type alias commit b9eaf46921c47d447e20dcb4ad72ebbd57f7ed48 Author: skarab42 <skarab@bluewin.ch> Date: Sun Mar 13 05:56:56 2022 +0100 refactor: exports all
- Loading branch information
Showing
4 changed files
with
57 additions
and
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,4 @@ | ||
import { dateType } from "./type/date"; | ||
import { instanceofType } from "./type/instanceof"; | ||
import { unsignedNumberType } from "./type/unsignedNumber"; | ||
import { unsignedIntegerType } from "./type/unsignedInteger"; | ||
import { integerType } from "./type/integer"; | ||
import { finiteType } from "./type/finite"; | ||
import { infinityType } from "./type/infinity"; | ||
import { nanType } from "./type/nan"; | ||
import { literalType } from "./type/literal"; | ||
import { nativeEnumType } from "./type/nativeEnum"; | ||
import { enumType } from "./type/enum"; | ||
import { unionType } from "./type/union"; | ||
import { nullableType } from "./type/nullable"; | ||
import { optionalType } from "./type/optional"; | ||
import { recordType } from "./type/record"; | ||
import { objectType } from "./type/object"; | ||
import { tupleType } from "./type/tuple"; | ||
import { mapType } from "./type/map"; | ||
import { setType } from "./type/set"; | ||
import { arrayType } from "./type/array"; | ||
import { undefinedType } from "./type/undefined"; | ||
import { nullType } from "./type/null"; | ||
import { functionType } from "./type/function"; | ||
import { symbolType } from "./type/symbol"; | ||
import { bigintType } from "./type/bigint"; | ||
import { booleanType } from "./type/boolean"; | ||
import { numberType } from "./type/number"; | ||
import { stringType } from "./type/string"; | ||
import { unknownType } from "./type/unknown"; | ||
import { neverType } from "./type/never"; | ||
import { promiseType } from "./type/promise"; | ||
|
||
export const t = { | ||
never: neverType, | ||
unknown: unknownType, | ||
any: unknownType, | ||
string: stringType, | ||
number: numberType, | ||
boolean: booleanType, | ||
bigint: bigintType, | ||
symbol: symbolType, | ||
function: functionType, | ||
null: nullType, | ||
undefined: undefinedType, | ||
void: undefinedType, | ||
literal: literalType, | ||
array: arrayType, | ||
tuple: tupleType, | ||
set: setType, | ||
map: mapType, | ||
object: objectType, | ||
optional: optionalType, | ||
nullable: nullableType, | ||
union: unionType, | ||
enum: enumType, | ||
nativeEnum: nativeEnumType, | ||
nan: nanType, | ||
infinity: infinityType, | ||
finite: finiteType, | ||
integer: integerType, | ||
int: integerType, | ||
unsignedInteger: unsignedIntegerType, | ||
uinteger: unsignedIntegerType, | ||
uint: unsignedIntegerType, | ||
unsignedNumber: unsignedNumberType, | ||
unumber: unsignedNumberType, | ||
instanceof: instanceofType, | ||
date: dateType, | ||
record: recordType, | ||
promise: promiseType, | ||
}; | ||
import * as lib from "./lib"; | ||
export * from "./lib"; | ||
export { lib as t }; | ||
export default lib; |
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,4 @@ | ||
export * from "./errors"; | ||
export * from "./types"; | ||
export * from "./type"; | ||
export * from "./util"; |
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,47 @@ | ||
export { arrayType as array } from "./array"; | ||
export { bigintType as bigint } from "./bigint"; | ||
export { booleanType as boolean } from "./boolean"; | ||
export { dateType as date } from "./date"; | ||
export { enumType as enum } from "./enum"; | ||
export { finiteType as finite } from "./finite"; | ||
export { infinityType as infinity } from "./infinity"; | ||
export { functionType as function } from "./function"; | ||
export { instanceofType as instanceof } from "./instanceof"; | ||
export { integerType as integer } from "./integer"; | ||
export { literalType as literal } from "./literal"; | ||
export { mapType as map } from "./map"; | ||
export { nanType as nan } from "./nan"; | ||
export { nativeEnumType as nativeEnum } from "./nativeEnum"; | ||
export { neverType as never } from "./never"; | ||
export { nullType as null } from "./null"; | ||
export { nullableType as nullable } from "./nullable"; | ||
export { numberType as number } from "./number"; | ||
export { objectType as object } from "./object"; | ||
export { optionalType as optional } from "./optional"; | ||
export { promiseType as promise } from "./promise"; | ||
export { recordType as record } from "./record"; | ||
export { setType as set } from "./set"; | ||
export { stringType as string } from "./string"; | ||
export { symbolType as symbol } from "./symbol"; | ||
export { tupleType as tuple } from "./tuple"; | ||
export { undefinedType as undefined } from "./undefined"; | ||
export { unionType as union } from "./union"; | ||
export { unknownType as unknown } from "./unknown"; | ||
export { unsignedIntegerType as unsignedInteger } from "./unsignedInteger"; | ||
export { unsignedNumberType as unsignedNumber } from "./unsignedNumber"; | ||
|
||
// Alias | ||
import { integerType } from "./integer"; | ||
import { undefinedType } from "./undefined"; | ||
import { unknownType } from "./unknown"; | ||
import { unsignedIntegerType } from "./unsignedInteger"; | ||
import { unsignedNumberType } from "./unsignedNumber"; | ||
|
||
export { | ||
integerType as int, | ||
undefinedType as void, | ||
unknownType as any, | ||
unsignedIntegerType as uinteger, | ||
unsignedIntegerType as uint, | ||
unsignedNumberType as unumber, | ||
}; |
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