mobx-keystone
Version:
A MobX powered state management solution based on data trees with first class support for TypeScript, snapshots, patches and much more
17 lines (13 loc) • 336 B
text/typescript
let typeCheckingAllowed = true
export function withoutTypeChecking(fn: () => void): void {
const oldTypeCheckingAllowed = typeCheckingAllowed
typeCheckingAllowed = false
try {
fn()
} finally {
typeCheckingAllowed = oldTypeCheckingAllowed
}
}
export function isTypeCheckingAllowed() {
return typeCheckingAllowed
}