@mockpiler/type-compiler
v0.2.0
Published
Types compilation for MockpilerJS
Downloads
6
Readme
@mockpiler/type-compiler
Types compilation for MockpilerJS
Status: Experimental
Requires typescript >= 4.1.0
Usage
import type { CompileMock } from '@mockpiler/type-compiler'
import { mock } from '@mockpiler/compiler'
const input = `
[
(2) {
name
age
}
]
`
const context = {
name: 'John Doe',
age: 33
}
const result = mock(input, context) as CompileMock<typeof input, typeof context>