TypeScript 类型参考
TypeScript内置类型和实用程序类型参考。
加载工具中...
相关工具
关于此工具
TypeScript内置类型和实用程序类型参考。
TypeScript内置类型和实用程序类型参考。
TypeScript内置类型和实用程序类型参考。
stringText values: 'hello'numberNumbers: 42, 3.14booleantrue / falsenullExplicit nullundefinedUninitializedsymbolUnique identifierbigintLarge integers: 100nanyOpt out of type checkingunknownSafe alternative to anyneverValue that never occursPartial<T>All properties optionalRequired<T>All properties requiredReadonly<T>All properties readonlyRecord<K,V>Object with key type K, value VPick<T,K>Pick subset of propertiesOmit<T,K>Remove subset of propertiesExclude<T,U>Exclude from unionExtract<T,U>Extract from unionNonNullable<T>Remove null/undefinedReturnType<T>Return type of functionParameters<T>Parameter types as tupleAwaited<T>Unwrap Promise typetypeof xType of variablekeyof TUnion of keysT[K]Indexed access typeT extends U ? X : YConditional typeinfer RInfer type variableT & UIntersection typeT | UUnion typeT[]Array of T[T, U]Tuple type(...args: T) => RFunction typeinterface vs typeinterface: extendable, type: aliases + unionsas constNarrow to literal typessatisfiesType-check without widening!Non-null assertion (use sparingly)?? operatorNullish coalescing?.Optional chaining