Make type relationships more explicit to help the tree shaker
parent
898fbafa5b
commit
27770ed1b5
|
@ -43,7 +43,7 @@ declare namespace monaco {
|
|||
}
|
||||
|
||||
declare namespace monaco.editor {
|
||||
|
||||
#include(vs/editor/browser/widget/diffNavigator): IDiffNavigator
|
||||
#includeAll(vs/editor/standalone/browser/standaloneEditor;modes.=>languages.;editorCommon.=>):
|
||||
#include(vs/editor/standalone/common/standaloneThemeService): BuiltinTheme, IStandaloneThemeData, IColors
|
||||
#include(vs/editor/common/modes/supports/tokenization): ITokenThemeRule
|
||||
|
|
|
@ -2,25 +2,17 @@
|
|||
// This file is adding references to various symbols which should not be removed via tree shaking
|
||||
|
||||
import { ServiceIdentifier } from './vs/platform/instantiation/common/instantiation';
|
||||
import { IHighlight } from './vs/base/parts/quickopen/browser/quickOpenModel';
|
||||
import { SimpleWorkerClient, create as create1 } from './vs/base/common/worker/simpleWorker';
|
||||
import { create as create1 } from './vs/base/common/worker/simpleWorker';
|
||||
import { create as create2 } from './vs/editor/common/services/editorSimpleWorker';
|
||||
import { SyncDescriptor0, SyncDescriptor1, SyncDescriptor2, SyncDescriptor3, SyncDescriptor4, SyncDescriptor5, SyncDescriptor6, SyncDescriptor7, SyncDescriptor8 } from './vs/platform/instantiation/common/descriptors';
|
||||
import { DiffNavigator } from './vs/editor/browser/widget/diffNavigator';
|
||||
import { DocumentRangeFormattingEditProvider } from './vs/editor/common/modes';
|
||||
import * as editorAPI from './vs/editor/editor.api';
|
||||
|
||||
(function () {
|
||||
var a: any;
|
||||
var b: any;
|
||||
a = (<DiffNavigator>b).previous; // IDiffNavigator
|
||||
a = (<ServiceIdentifier<any>>b).type;
|
||||
a = (<IHighlight>b).start;
|
||||
a = (<IHighlight>b).end;
|
||||
a = (<SimpleWorkerClient<any, any>>b).getProxyObject; // IWorkerClient
|
||||
a = create1;
|
||||
a = create2;
|
||||
a = (<DocumentRangeFormattingEditProvider>b).extensionId;
|
||||
|
||||
// injection madness
|
||||
a = (<SyncDescriptor0<any>>b).ctor;
|
||||
|
|
|
@ -19,13 +19,14 @@ import { OS } from 'vs/base/common/platform';
|
|||
import { ResolvedKeybinding } from 'vs/base/common/keyCodes';
|
||||
import { IItemAccessor } from 'vs/base/parts/quickopen/common/quickOpenScorer';
|
||||
import { coalesce } from 'vs/base/common/arrays';
|
||||
import { IMatch } from 'vs/base/common/filters';
|
||||
|
||||
export interface IContext {
|
||||
event: any;
|
||||
quickNavigateConfiguration: IQuickNavigateConfiguration;
|
||||
}
|
||||
|
||||
export interface IHighlight {
|
||||
export interface IHighlight extends IMatch {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
|
|
|
@ -30,10 +30,17 @@ const defaultOptions: Options = {
|
|||
alwaysRevealFirst: true
|
||||
};
|
||||
|
||||
export interface IDiffNavigator {
|
||||
canNavigate(): boolean;
|
||||
next(): void;
|
||||
previous(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new diff navigator for the provided diff editor.
|
||||
*/
|
||||
export class DiffNavigator extends Disposable {
|
||||
export class DiffNavigator extends Disposable implements IDiffNavigator {
|
||||
|
||||
private readonly _editor: IDiffEditor;
|
||||
private readonly _options: Options;
|
||||
|
|
|
@ -9,7 +9,7 @@ import { URI } from 'vs/base/common/uri';
|
|||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { OpenerService } from 'vs/editor/browser/services/openerService';
|
||||
import { DiffNavigator } from 'vs/editor/browser/widget/diffNavigator';
|
||||
import { DiffNavigator, IDiffNavigator } from 'vs/editor/browser/widget/diffNavigator';
|
||||
import { ConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions';
|
||||
import { BareFontInfo, FontInfo } from 'vs/editor/common/config/fontInfo';
|
||||
import { Token } from 'vs/editor/common/core/token';
|
||||
|
@ -127,13 +127,6 @@ export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorC
|
|||
});
|
||||
}
|
||||
|
||||
export interface IDiffNavigator {
|
||||
canNavigate(): boolean;
|
||||
next(): void;
|
||||
previous(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface IDiffNavigatorOptions {
|
||||
readonly followsCaret?: boolean;
|
||||
readonly ignoreCharChanges?: boolean;
|
||||
|
|
|
@ -802,6 +802,12 @@ declare namespace monaco {
|
|||
|
||||
declare namespace monaco.editor {
|
||||
|
||||
export interface IDiffNavigator {
|
||||
canNavigate(): boolean;
|
||||
next(): void;
|
||||
previous(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new editor under `domElement`.
|
||||
|
@ -824,13 +830,6 @@ declare namespace monaco.editor {
|
|||
*/
|
||||
export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;
|
||||
|
||||
export interface IDiffNavigator {
|
||||
canNavigate(): boolean;
|
||||
next(): void;
|
||||
previous(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface IDiffNavigatorOptions {
|
||||
readonly followsCaret?: boolean;
|
||||
readonly ignoreCharChanges?: boolean;
|
||||
|
|
Loading…
Reference in New Issue