File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 3.3.0" ,
4
4
"description" : " Transforms module resolution paths using TypeScript path mapping and/or custom paths" ,
5
5
"main" : " dist/index.js" ,
6
- "types" : " dist /index.d.ts" ,
6
+ "types" : " types /index.d.ts" ,
7
7
"scripts" : {
8
8
"compile" : " tsc" ,
9
9
"build" : " yarn run clean && yarn run compile" ,
45
45
],
46
46
"files" : [
47
47
" dist" ,
48
+ " types" ,
48
49
" README.md" ,
49
50
" CHANGELOG.md" ,
50
51
" register.js"
Original file line number Diff line number Diff line change 2
2
"compilerOptions" : {
3
3
"noErrorTruncation" : false ,
4
4
"incremental" : true ,
5
+ "declaration" : false ,
5
6
6
7
"lib" : [ " esnext" ],
7
8
"target" : " es2015" ,
Original file line number Diff line number Diff line change
1
+ import TSNode from 'ts-node'
2
+ import ts from 'typescript'
3
+
4
+ /* ****************************************************************************************************************** *
5
+ * Hardcoded declarations file for npm package
6
+ * ****************************************************************************************************************** */
7
+
8
+ export interface TsTransformPathsConfig {
9
+ readonly useRootDirs ?: boolean ;
10
+ readonly exclude ?: string [ ] ;
11
+ readonly afterDeclarations ?: boolean ;
12
+ readonly tsConfig ?: string ;
13
+ readonly transform ?: string
14
+ }
15
+
16
+ export interface TransformerExtras {
17
+ /**
18
+ * Originating TypeScript instance
19
+ */
20
+ ts : typeof ts ;
21
+ }
22
+
23
+ export function register ( ) : TSNode . RegisterOptions | undefined
24
+
25
+ export default function transformer (
26
+ program ?: ts . Program ,
27
+ pluginConfig ?: TsTransformPathsConfig ,
28
+ transformerExtras ?: TransformerExtras ,
29
+ /**
30
+ * Supply if manually transforming with compiler API via 'transformNodes' / 'transformModule'
31
+ */
32
+ manualTransformOptions ?: {
33
+ compilerOptions ?: ts . CompilerOptions ;
34
+ fileNames ?: string [ ] ;
35
+ }
36
+ ) : ts . CustomTransformer
You can’t perform that action at this time.
0 commit comments