From d1e16f5899de5ee51a1bc2d108b5230a6375515f Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Tue, 29 Jan 2019 11:53:11 -0800 Subject: [PATCH] tweaks to allow building declerations --- src/mol-data/util/equivalence-classes.ts | 2 +- src/mol-plugin/behavior/behavior.ts | 6 ++++-- src/mol-task/execution/synchronous.ts | 2 +- tsconfig.json | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mol-data/util/equivalence-classes.ts b/src/mol-data/util/equivalence-classes.ts index cfad84f04..d6fcd537b 100644 --- a/src/mol-data/util/equivalence-classes.ts +++ b/src/mol-data/util/equivalence-classes.ts @@ -4,7 +4,7 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -class EquivalenceClassesImpl<K, V> { +export class EquivalenceClassesImpl<K, V> { private id = 0; private byHash = new Map<number, { id: number, keys: K[], value: V }[]>(); diff --git a/src/mol-plugin/behavior/behavior.ts b/src/mol-plugin/behavior/behavior.ts index e42dabfdd..c463184fa 100644 --- a/src/mol-plugin/behavior/behavior.ts +++ b/src/mol-plugin/behavior/behavior.ts @@ -65,7 +65,8 @@ namespace PluginBehavior { export function simpleCommandHandler<T>(cmd: PluginCommand<T>, action: (data: T, ctx: PluginContext) => void | Promise<void>) { return class implements PluginBehavior<{}> { - private sub: PluginCommand.Subscription | undefined = void 0; + // TODO can't be private due to bug with generating declerations, see https://github.com/Microsoft/TypeScript/issues/17293 + /** private */ sub: PluginCommand.Subscription | undefined = void 0; register(): void { this.sub = cmd.subscribe(this.ctx, data => action(data, this.ctx)); } @@ -73,7 +74,8 @@ namespace PluginBehavior { if (this.sub) this.sub.unsubscribe(); this.sub = void 0; } - constructor(private ctx: PluginContext) { } + // TODO can't be private due to bug with generating declerations, see https://github.com/Microsoft/TypeScript/issues/17293 + constructor(/** private */ public ctx: PluginContext) { } } } diff --git a/src/mol-task/execution/synchronous.ts b/src/mol-task/execution/synchronous.ts index 5c729a610..9ba6db28e 100644 --- a/src/mol-task/execution/synchronous.ts +++ b/src/mol-task/execution/synchronous.ts @@ -6,7 +6,7 @@ import { RuntimeContext } from './runtime-context' -class SynchronousRuntimeContext implements RuntimeContext { +export class SynchronousRuntimeContext implements RuntimeContext { shouldUpdate = false; isSynchronous = true; update(progress: string | Partial<RuntimeContext.ProgressUpdate>, dontNotify?: boolean): Promise<void> | void { } diff --git a/tsconfig.json b/tsconfig.json index a26ec6ab4..fabe88108 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "composite": true, "target": "es5", "alwaysStrict": true, "noImplicitAny": true, -- GitLab