Skip to content

Instantly share code, notes, and snippets.

View qlonik's full-sized avatar

Nikita Volodin qlonik

View GitHub Profile
@qlonik
qlonik / jsc-prop-connector.js
Last active September 22, 2019 14:24
JSVerify connector for ava written in TS
// Given prettyPrintResult, isArbitraryLike and TETS_PRINT_LIMIT as defined in `property-test.ts` exist,
// Here are two variants tha could be used from JS. I tried typing them to be used in TS, but
// it is very hard to type these functions.
export async function jsc_macro_1(t, ...args) {
const logsMap = new Map()
const defaultOpts = { quiet: true }
const passedOpts = typeof args[0] !== 'function' ? args.shift() : {}
const opts = Object.assign(defaultOpts, passedOpts)
const propertyFn = args.shift()