mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
added typing for codegen.macro (#36409)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import codegen = require('codegen.macro');
|
||||
|
||||
const eg1: string = codegen`module.exports = "'hello world'"`;
|
||||
const eg2: number = codegen`module.exports = "42"`;
|
||||
const eg3: { [key: string]: string } = codegen`module.exports = "({ hello: 'world' })"`;
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// Type definitions for codegen.macro 3.0
|
||||
// Project: https://github.com/kentcdodds/codegen.macro
|
||||
// Definitions by: Charlee Li <https://github.com/charlee>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function codegen(strings: TemplateStringsArray, ...values: any[]): any;
|
||||
export = codegen;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"codegen.macro-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user