DefinitelyTyped/types/preval.macro/preval.macro-tests.ts
2018-11-28 01:31:06 +08:00

6 lines
234 B
TypeScript

import preval = require('preval.macro');
const eg1: string = preval`module.exports = 'hello world`;
const eg2: number = preval`module.exports = 42`;
const eg3: { [key: string]: string } = preval`module.exports = { hello: 'world' }`;