mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
added typing for codegen.macro (#36409)
This commit is contained in:
parent
d0c0725ae4
commit
71f8b36c56
5
types/codegen.macro/codegen.macro-tests.ts
Normal file
5
types/codegen.macro/codegen.macro-tests.ts
Normal file
@ -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' })"`;
|
||||
7
types/codegen.macro/index.d.ts
vendored
Normal file
7
types/codegen.macro/index.d.ts
vendored
Normal file
@ -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;
|
||||
23
types/codegen.macro/tsconfig.json
Normal file
23
types/codegen.macro/tsconfig.json
Normal file
@ -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"
|
||||
]
|
||||
}
|
||||
1
types/codegen.macro/tslint.json
Normal file
1
types/codegen.macro/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user