zl程序教程

您现在的位置是:首页 >  前端

当前栏目

[TypeScript] AssertType

2023-09-14 08:59:12 时间
export function assertType<T>(obj: unknown = {}): T {
    return obj as T
}

const store = assertType<Store>({select: () => of()})