mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Add types for rechoir
This commit is contained in:
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// Type definitions for rechoir 0.6
|
||||
// Project: https://github.com/tkellen/node-rechoir
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Extensions } from 'interpret';
|
||||
|
||||
export function prepare(
|
||||
config: Extensions,
|
||||
filepath: string,
|
||||
requireFrom?: string
|
||||
): true | Attempt[];
|
||||
|
||||
export interface Attempt {
|
||||
moduleName: string;
|
||||
module: any;
|
||||
error: Error | null;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { extensions as config } from 'interpret';
|
||||
import { prepare } from 'rechoir';
|
||||
|
||||
// $ExpectType true | Attempt[]
|
||||
prepare(config, './test/fixtures/test.coffee');
|
||||
prepare(config, './test/fixtures/test.coffee', './');
|
||||
@@ -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",
|
||||
"rechoir-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user