Skip to content

Commit

Permalink
feat: export TSConfig interface
Browse files Browse the repository at this point in the history
  • Loading branch information
RasPhilCo committed Sep 16, 2020
1 parent 8332b3c commit b1e2bd6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
13 changes: 1 addition & 12 deletions src/config/ts-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as fs from 'fs'
import * as path from 'path'
import * as TSNode from 'ts-node'

import {TSConfig} from '../interfaces/ts-config'
import {Debug} from './util'
// eslint-disable-next-line new-cap
const debug = Debug()
Expand All @@ -10,18 +11,6 @@ const tsconfigs: {[root: string]: TSConfig} = {}
const rootDirs: string[] = []
const typeRoots = [`${__dirname}/../node_modules/@types`]

export interface TSConfig {
compilerOptions: {
rootDir?: string;
rootDirs?: string[];
outDir?: string;
target?: string;
esModuleInterop?: boolean;
experimentalDecorators?: boolean;
emitDecoratorMetadata?: boolean;
};
}

function loadTSConfig(root: string): TSConfig | undefined {
const tsconfigPath = path.join(root, 'tsconfig.json')
let typescript: typeof import('typescript') | undefined
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export {Manifest} from './manifest'
export {PJSON} from './pjson'
export {Plugin, PluginOptions, Options} from './plugin'
export {Topic} from './topic'
export {TSConfig} from './ts-config'
11 changes: 11 additions & 0 deletions src/interfaces/ts-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export interface TSConfig {
compilerOptions: {
rootDir?: string;
rootDirs?: string[];
outDir?: string;
target?: string;
esModuleInterop?: boolean;
experimentalDecorators?: boolean;
emitDecoratorMetadata?: boolean;
};
}

0 comments on commit b1e2bd6

Please sign in to comment.