0.2.0 • Published 4 years ago

@mockpiler/type-compiler v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@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>