Skip to content

Commit 98edc01

Browse files
authored
Only export symbols that are needed (microsoft#165052)
* Fixes microsoft#164934: Only export symbols that are needed * `KeyMod` is referenced by `monaco.d.ts`
1 parent 3d30ef3 commit 98edc01

33 files changed

+45
-210
lines changed

src/vs/base/common/scrollable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ export class SmoothScrollingUpdate {
404404

405405
}
406406

407-
export interface IAnimation {
407+
interface IAnimation {
408408
(completion: number): number;
409409
}
410410

src/vs/base/parts/ipc/common/ipc.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface IServerChannel<TContext = string> {
3636
listen<T>(ctx: TContext, event: string, arg?: any): Event<T>;
3737
}
3838

39-
export const enum RequestType {
39+
const enum RequestType {
4040
Promise = 100,
4141
PromiseCancel = 101,
4242
EventListen = 102,
@@ -62,7 +62,7 @@ type IRawEventListenRequest = { type: RequestType.EventListen; id: number; chann
6262
type IRawEventDisposeRequest = { type: RequestType.EventDispose; id: number };
6363
type IRawRequest = IRawPromiseRequest | IRawPromiseCancelRequest | IRawEventListenRequest | IRawEventDisposeRequest;
6464

65-
export const enum ResponseType {
65+
const enum ResponseType {
6666
Initialize = 200,
6767
PromiseSuccess = 201,
6868
PromiseError = 202,
@@ -1186,7 +1186,7 @@ function pretty(data: any): any {
11861186
return prettyWithoutArrays(data);
11871187
}
11881188

1189-
export function logWithColors(direction: string, totalLength: number, msgLength: number, req: number, initiator: RequestInitiator, str: string, data: any): void {
1189+
function logWithColors(direction: string, totalLength: number, msgLength: number, req: number, initiator: RequestInitiator, str: string, data: any): void {
11901190
data = pretty(data);
11911191

11921192
const colorTable = colorTables[initiator];

src/vs/editor/browser/config/fontMeasurements.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface ISerializedFontInfo {
3232
readonly maxDigitWidth: number;
3333
}
3434

35-
class FontMeasurementsImpl extends Disposable {
35+
export class FontMeasurementsImpl extends Disposable {
3636

3737
private _cache: FontMeasurementsCache;
3838
private _evictUntrustedReadingsTimeout: number;

src/vs/editor/browser/controller/mouseTarget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ export class MouseTargetFactory {
10071007
}
10081008
}
10091009

1010-
export function shadowCaretRangeFromPoint(shadowRoot: ShadowRoot, x: number, y: number): Range {
1010+
function shadowCaretRangeFromPoint(shadowRoot: ShadowRoot, x: number, y: number): Range {
10111011
const range = document.createRange();
10121012

10131013
// Get the element under the point

src/vs/editor/browser/services/abstractCodeEditorService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export class ModelTransientSettingWatcher {
293293
}
294294
}
295295

296-
export class RefCountedStyleSheet {
296+
class RefCountedStyleSheet {
297297

298298
private readonly _parent: AbstractCodeEditorService;
299299
private readonly _editorId: string;
@@ -366,7 +366,7 @@ interface IModelDecorationOptionsProvider extends IDisposable {
366366
resolveDecorationCSSRules(): CSSRuleList;
367367
}
368368

369-
export class DecorationSubTypeOptionsProvider implements IModelDecorationOptionsProvider {
369+
class DecorationSubTypeOptionsProvider implements IModelDecorationOptionsProvider {
370370

371371
private readonly _styleSheet: GlobalStyleSheet | RefCountedStyleSheet;
372372
public refCount: number;
@@ -421,7 +421,7 @@ interface ProviderArguments {
421421
}
422422

423423

424-
export class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider {
424+
class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider {
425425

426426
private readonly _disposables = new DisposableStore();
427427
private readonly _styleSheet: GlobalStyleSheet | RefCountedStyleSheet;

src/vs/editor/common/commands/shiftCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface IShiftCommandOpts {
2424
}
2525

2626
const repeatCache: { [str: string]: string[] } = Object.create(null);
27-
export function cachedStringRepeat(str: string, count: number): string {
27+
function cachedStringRepeat(str: string, count: number): string {
2828
if (count <= 0) {
2929
return '';
3030
}

src/vs/editor/common/cursorCommon.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ export interface IColumnSelectData {
2626
toViewVisualColumn: number;
2727
}
2828

29-
export const enum RevealTarget {
30-
Primary = 0,
31-
TopMost = 1,
32-
BottomMost = 2
33-
}
34-
3529
/**
3630
* This is an operation type that will be recorded for undo/redo purposes.
3731
* The goal is to introduce an undo stop when the controller switches between different operation types.
@@ -48,9 +42,6 @@ export const enum EditOperationType {
4842
export interface CharacterMap {
4943
[char: string]: string;
5044
}
51-
export interface MultipleCharacterMap {
52-
[char: string]: string[];
53-
}
5445

5546
const autoCloseAlways = () => true;
5647
const autoCloseNever = () => false;

src/vs/editor/common/languages/linkComputer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const enum State {
3232

3333
export type Edge = [State, number, State];
3434

35-
export class Uint8Matrix {
35+
class Uint8Matrix {
3636

3737
private readonly _data: Uint8Array;
3838
public readonly rows: number;

src/vs/editor/common/model/textModel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export function createTextBuffer(value: string | model.ITextBufferFactory | mode
111111
let MODEL_ID = 0;
112112

113113
const LIMIT_FIND_COUNT = 999;
114-
export const LONG_LINE_BOUNDARY = 10000;
114+
const LONG_LINE_BOUNDARY = 10000;
115115

116116
class TextModelSnapshot implements model.ITextSnapshot {
117117

@@ -2308,7 +2308,7 @@ function _normalizeOptions(options: model.IModelDecorationOptions): ModelDecorat
23082308
return ModelDecorationOptions.createDynamic(options);
23092309
}
23102310

2311-
export class DidChangeDecorationsEmitter extends Disposable {
2311+
class DidChangeDecorationsEmitter extends Disposable {
23122312

23132313
private readonly _actual: Emitter<IModelDecorationsChangedEvent> = this._register(new Emitter<IModelDecorationsChangedEvent>());
23142314
public readonly event: Event<IModelDecorationsChangedEvent> = this._actual.event;
@@ -2394,7 +2394,7 @@ export class DidChangeDecorationsEmitter extends Disposable {
23942394

23952395
//#endregion
23962396

2397-
export class DidChangeContentEmitter extends Disposable {
2397+
class DidChangeContentEmitter extends Disposable {
23982398

23992399
/**
24002400
* Both `fastEvent` and `slowEvent` work the same way and contain the same events, but first we invoke `fastEvent` and then `slowEvent`.

src/vs/editor/common/services/editorSimpleWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export interface IWordRange {
9393
/**
9494
* @internal
9595
*/
96-
export class MirrorModel extends BaseMirrorModel implements ICommonModel {
96+
class MirrorModel extends BaseMirrorModel implements ICommonModel {
9797

9898
public get uri(): URI {
9999
return this._uri;

0 commit comments

Comments
 (0)