Browse Source

Removes synthetic imports for webviews

main
Eric Amodio 2 years ago
parent
commit
87dc30412e
3 changed files with 4 additions and 2 deletions
  1. +3
    -1
      src/webviews/apps/shared/appBase.ts
  2. +1
    -0
      src/webviews/apps/shared/events.ts
  3. +0
    -1
      src/webviews/apps/tsconfig.json

+ 3
- 1
src/webviews/apps/shared/appBase.ts View File

@ -22,7 +22,7 @@ function nextIpcId() {
return `webview:${ipcSequence}`; return `webview:${ipcSequence}`;
} }
export abstract class App<State extends object> {
export abstract class App<State extends object = any> {
private readonly _api: VsCodeApi; private readonly _api: VsCodeApi;
protected state: State; protected state: State;
@ -78,6 +78,8 @@ export abstract class App {
protected setState(state: State) { protected setState(state: State) {
this.state = state; this.state = state;
if (state == null) return;
this._api.setState(state); this._api.setState(state);
} }

+ 1
- 0
src/webviews/apps/shared/events.ts View File

@ -39,6 +39,7 @@ export class Emitter {
} }
}, },
}; };
if (Array.isArray(disposables)) { if (Array.isArray(disposables)) {
disposables.push(result); disposables.push(result);
} }

+ 0
- 1
src/webviews/apps/tsconfig.json View File

@ -1,7 +1,6 @@
{ {
"extends": "../../../tsconfig.base.json", "extends": "../../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"allowSyntheticDefaultImports": true,
"lib": ["dom", "dom.iterable", "es2020"], "lib": ["dom", "dom.iterable", "es2020"],
"outDir": "../../" "outDir": "../../"
}, },

Loading…
Cancel
Save