Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: assume engine is always on config
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 30, 2018
1 parent b4afd87 commit 8d02f30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export interface IConfig {
/**
* active @dxcli/engine
*/
engine?: IEngine
engine: IEngine
/**
* npm registry to use for installing plugins
*/
Expand All @@ -157,10 +157,6 @@ export interface IConfig {
topics: ITopic[]
}

export interface ICLIConfig extends IConfig {
engine: IEngine
}

export interface TSConfig {
compilerOptions: {
rootDirs?: string[]
Expand Down Expand Up @@ -206,7 +202,7 @@ export class Config implements IConfig {
debug: number = 0
hooks: {[k: string]: string[]}
hooksTS?: {[k: string]: string[]}
engine?: IEngine
engine: IEngine
npmRegistry: string
legacy = false
topics: ITopic[]
Expand Down
4 changes: 2 additions & 2 deletions src/engine.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {ICachedCommand} from './command'
import {ICLIConfig, IConfig} from './config'
import {IConfig} from './config'
import {IPlugin} from './plugin'
import {ITopic} from './topic'

export interface IEngine {
readonly config: ICLIConfig
readonly config: IConfig
readonly plugins: IPlugin[]

readonly topics: ITopic[]
Expand Down
4 changes: 2 additions & 2 deletions src/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ICommand} from './command'
import {ICLIConfig} from './config'
import {IConfig} from './config'
import {IPlugin} from './plugin'

export interface Hooks {
Expand All @@ -15,4 +15,4 @@ export interface Hooks {
}
}

export type IHook<T extends {}> = (options: T & {config: ICLIConfig}) => any
export type IHook<T extends {}> = (options: T & {config: IConfig}) => any

0 comments on commit 8d02f30

Please sign in to comment.