export type Maybe<T extends {}> = T | null | undefined;
type tests = [
// @ts-expect-error
Maybe<null>,
// @ts-expect-error
Maybe<undefined>,
Maybe<string>,
Maybe<false>,
Maybe<0>,
Maybe<"">
];
标签:Typescript,undefined,Anything,Maybe,ts,null From: https://www.cnblogs.com/Answer1215/p/16974697.html