Add @sinclair/typebox as dependency and remove shim
Removed the manual TypeBox type definitions from external-shims.d.ts and added @sinclair/typebox as a dependency in package.json and package.public.json. Bumped package version to 0.0.4 to reflect this change.
This commit is contained in:
1 parent
3c49dffb17
commit
e0eec84f32
3 files changed
+5
-35
No files matched your search
-32
@@ -75,38 +75,6 @@ declare module 'async-mutex' {
|
||||
export default _async_mutex_default;
|
||||
}
|
||||
|
||||
declare module '@sinclair/typebox' {
|
||||
export const Type: {
|
||||
Object: (...args: any[]) => any;
|
||||
String: (...args: any[]) => any;
|
||||
Number: (...args: any[]) => any;
|
||||
Boolean: (...args: any[]) => any;
|
||||
Array: (...args: any[]) => any;
|
||||
Union: (...args: any[]) => any;
|
||||
Literal: (...args: any[]) => any;
|
||||
Optional: (...args: any[]) => any;
|
||||
Record: (...args: any[]) => any;
|
||||
Any: (...args: any[]) => any;
|
||||
} & any;
|
||||
|
||||
// Make Static<> actually resolve to a structural type so optional properties work.
|
||||
export type Static<T> = T extends { static: infer S; } ? S : any;
|
||||
|
||||
export interface TSchema { static?: any; }
|
||||
export interface TObject<T = any> extends TSchema { }
|
||||
export interface TOptional<T = any> extends TSchema { }
|
||||
export interface TNumber extends TSchema { }
|
||||
export interface TString extends TSchema { }
|
||||
export interface TBoolean extends TSchema { }
|
||||
export interface TArray<T = any> extends TSchema { }
|
||||
export interface TUnion<T = any> extends TSchema { }
|
||||
export interface TLiteral<T = any> extends TSchema { }
|
||||
export interface TAny extends TSchema { }
|
||||
export interface TNull extends TSchema { }
|
||||
export interface TUndefined extends TSchema { }
|
||||
export interface TVoid extends TSchema { }
|
||||
}
|
||||
|
||||
declare module 'napcat-protobuf' {
|
||||
export class NapProtoMsg<T = any> {
|
||||
constructor (schema: any);
|
||||
|
||||
Reference in new issue
Block a user