English | 简体中文
A collection of TypeScript utility types
- Version >= 5.0.0
npm install @13onthecode/types --save-devimporttype{MergeObject}from'@13onthecode/types'typeFoo={foo: 'foo'other: {foo: 'foo'}}typeBar={bar: 'bar'other: {bar: 'bar'}}typeMerged=MergeObject<Foo,Bar>// => {// foo: "foo"// bar: "bar"// other: {// bar: 'bar'// }// }typeDeepMerged=MergeObject<Foo,Bar,{mode: 'deep'}>// => {// foo: "foo"// bar: "bar"// other: {// foo: "foo"// bar: "bar"// }// }EmptyArrayEmptyMapEmptyObjectEmptyRecordEmptySetEmptyTuplePrimitiveTypedArrayUnknownArrayUnknownAsyncFunctionUnknownFunctionUnknownMapUnknownObjectUnknownRecordUnknownSetUnknownTuple
IsAnyIsArrayIsAsyncFunctionIsBigintIsBigintLiteralIsBooleanIsBooleanLiteralIsContainsIsEmptyArrayIsEmptyMapIsEmptyObjectIsEmptyRecordIsEmptySetIsEmptyStringIsEqualIsExtendsIsFalseIsFunctionIsLiteralIsMapIsNeverIsNonNullableIsNullIsNullableIsNumberIsNumberLiteralIsObjectIsPrimitiveIsSetIsStringIsStringLiteralIsSymbolIsSymbolLiteralIsTrueIsTupleIsUndefinedIsUnionIsUnknownIsVariadicTuple
EntriesGetKeysGetOptionalGetReadonlyGetRequiredGetValuesHasIntersectionOmitByValuesOmitIndexSignaturePickByValuesPickIndexSignaturePrettifySetOptionalSetReadonlySetRequiredToArrayToNumberToPrimitiveToTupleToUnionUnionToIntersectionWritable
MIT License © 2023-PRESENT 13OnTheCode