wip: Creating an sdk builder that has all the generics we need in one place

This commit is contained in:
BluJ
2023-05-08 16:43:47 -06:00
parent e17668da00
commit 2b267c6c60
16 changed files with 275 additions and 51 deletions

View File

@@ -1,14 +0,0 @@
export declare const wrapperDataContractType: unique symbol
export type WrapperDataContract<A> = {
[wrapperDataContractType]: A
}
export const neverWrapperDataContract: WrapperDataContract<never> = null as any
/**
* Used to indicate the type of the wrapper data. To be used in areas where
* we need to know the wrapper data value
*/
export function createWrapperDataContract<A = never>(): A extends never
? "Wrapper Data Contract must be created with a generic"
: WrapperDataContract<A> {
return null as any
}