Add TreeModel and HasSubtree implementation
This commit is contained in:
@@ -63,24 +63,24 @@ export class ShellDirective extends Directive {
|
||||
globalRegistry.forceContextOverride()
|
||||
|
||||
// Create the ts-node compiler service.
|
||||
const replService = tsNode.createRepl()
|
||||
const service = tsNode.create({...replService.evalAwarePartialHost})
|
||||
replService.setService(service)
|
||||
// const replService = tsNode.createRepl()
|
||||
// const service = tsNode.create({...replService.evalAwarePartialHost})
|
||||
// replService.setService(service)
|
||||
|
||||
// We global these values into the REPL's state directly (using the `state` object
|
||||
// above), but since we're using a separate ts-node interpreter, we need to make it
|
||||
// aware of the globals using declaration syntax.
|
||||
replService.evalCode(`
|
||||
declare const lib: typeof import('@extollo/lib');
|
||||
declare const app: typeof lib['Application'];
|
||||
declare const globalRegistry: typeof lib['globalRegistry'];
|
||||
`)
|
||||
// replService.evalCode(`
|
||||
// declare const lib: typeof import('@extollo/lib');
|
||||
// declare const app: typeof lib['Application'];
|
||||
// declare const globalRegistry: typeof lib['globalRegistry'];
|
||||
// `)
|
||||
|
||||
// Print the welome message and start the interpreter
|
||||
this.nativeOutput(this.options.welcome)
|
||||
this.repl = repl.start({
|
||||
// Causes the REPL to use the ts-node interpreter service:
|
||||
eval: !this.option('js', false) ? (...args) => replService.nodeEval(...args) : undefined,
|
||||
// eval: !this.option('js', false) ? (...args) => replService.nodeEval(...args) : undefined,
|
||||
prompt: this.options.prompt,
|
||||
useGlobal: true,
|
||||
useColors: true,
|
||||
|
||||
Reference in New Issue
Block a user