Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Missing dev dependencies can cause issues on importing from package types, so we are adding an explicit declaration file for exported types
- Loading branch information
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import TSNode from 'ts-node' | ||
import ts from 'typescript' | ||
|
||
/* ****************************************************************************************************************** * | ||
* Hardcoded declarations file for npm package | ||
* ****************************************************************************************************************** */ | ||
|
||
export interface TsTransformPathsConfig { | ||
readonly useRootDirs?: boolean; | ||
readonly exclude?: string[]; | ||
readonly afterDeclarations?: boolean; | ||
readonly tsConfig?: string; | ||
readonly transform?: string | ||
} | ||
|
||
export interface TransformerExtras { | ||
/** | ||
* Originating TypeScript instance | ||
*/ | ||
ts: typeof ts; | ||
} | ||
|
||
export function register(): TSNode.RegisterOptions | undefined | ||
|
||
export default function transformer( | ||
program?: ts.Program, | ||
pluginConfig?: TsTransformPathsConfig, | ||
transformerExtras?: TransformerExtras, | ||
/** | ||
* Supply if manually transforming with compiler API via 'transformNodes' / 'transformModule' | ||
*/ | ||
manualTransformOptions?: { | ||
compilerOptions?: ts.CompilerOptions; | ||
fileNames?: string[]; | ||
} | ||
): ts.CustomTransformer |