Skip to content

Commit 76bef7d

Browse files
committed
reorganize API definitions to avoid circular imports
1 parent 93e7d4d commit 76bef7d

File tree

5 files changed

+40
-32
lines changed

5 files changed

+40
-32
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Extractor Public API
3+
*
4+
* Please note that this APIs can be subject to change and relocation to separate package in the future releases.
5+
*
6+
* @see https://github.com/krassowski/jupyterlab-lsp/issues/561
7+
*/
8+
export { LanguageIdentifier } from '../lsp';
9+
export {
10+
IForeignCodeExtractor,
11+
IForeignCodeExtractorsRegistry,
12+
IExtractedCode
13+
} from '../extractors/types';
14+
export { RegExpForeignCodeExtractor } from '../extractors/regexp';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** Extractor Public API */
2+
export * from './extractor';
3+
4+
/** Overrides Public API */
5+
export * from './overrides';
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Overrides Public API
3+
*
4+
* Please note that this APIs can be subject to change and relocation to separate package in the future releases.
5+
*
6+
* @see https://github.com/krassowski/jupyterlab-lsp/issues/561
7+
*/
8+
export {
9+
ILSPCodeOverridesManager,
10+
IScopedCodeOverride
11+
} from '../overrides/tokens';

packages/jupyterlab-lsp/src/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/** The Public API, as exposed in the `main` field of package.json */
2+
3+
/** General public tokens, including lumino Tokens and namespaces */
4+
export * from './tokens';
5+
6+
/** Component- and feature-specific APIs */
7+
export * from './api';
8+
19
import {
210
JupyterFrontEnd,
311
JupyterFrontEndPlugin
@@ -51,8 +59,6 @@ import { CODE_OVERRIDES_MANAGER } from './overrides';
5159
import IPaths = JupyterFrontEnd.IPaths;
5260
import { LOG_CONSOLE } from './virtual/console';
5361

54-
export * from './tokens';
55-
5662
export interface IFeatureOptions {
5763
/**
5864
* The feature to be registered.

packages/jupyterlab-lsp/src/tokens.ts

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,39 +17,11 @@ import {
1717
IContextMenuOptions
1818
} from './command_manager';
1919
import IEditor = CodeEditor.IEditor;
20-
21-
/**
22-
* Extractor API
23-
*
24-
* Please note that this APIs can be subject to change and relocation to separate package in the future releases.
25-
*
26-
* @see https://github.com/krassowski/jupyterlab-lsp/issues/561
27-
*/
28-
import { LanguageIdentifier } from './lsp';
2920
import {
3021
IForeignCodeExtractor,
31-
IForeignCodeExtractorsRegistry,
32-
IExtractedCode
22+
IForeignCodeExtractorsRegistry
3323
} from './extractors/types';
34-
export {
35-
IExtractedCode,
36-
IForeignCodeExtractorsRegistry,
37-
IForeignCodeExtractor,
38-
LanguageIdentifier
39-
};
40-
export { RegExpForeignCodeExtractor } from './extractors/regexp';
41-
42-
/**
43-
* Overrides API
44-
*
45-
* Please note that this APIs can be subject to change and relocation to separate package in the future releases.
46-
*
47-
* @see https://github.com/krassowski/jupyterlab-lsp/issues/561
48-
*/
49-
export {
50-
ILSPCodeOverridesManager,
51-
IScopedCodeOverride
52-
} from './overrides/tokens';
24+
import { LanguageIdentifier } from './lsp';
5325

5426
export type TLanguageServerId = string;
5527
export type TLanguageId = string;

0 commit comments

Comments
 (0)