Skip to content

Commit

Permalink
fix(NA): @kbn/monaco types exports (#113937)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic authored Oct 6, 2021
1 parent 4243c57 commit e594dee
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-monaco/src/esql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { LangModule as LangModuleType } from '../types';
import { LangModuleType } from '../types';
import { ID } from './constants';
import { lexerRules } from './lexer_rules';

Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-monaco/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import { monaco } from './monaco_imports';
import { LangModule as LangModuleType } from './types';
import { LangModuleType } from './types';

function registerLanguage(language: LangModuleType) {
const { ID, lexerRules, languageConfiguration } = language;
Expand Down
9 changes: 3 additions & 6 deletions packages/kbn-monaco/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ import './register_globals';

export { monaco } from './monaco_imports';
export { XJsonLang } from './xjson';
export { PainlessLang, PainlessContext, PainlessAutocompleteField } from './painless';
export * from './painless';
/* eslint-disable-next-line @kbn/eslint/module_migration */
import * as BarePluginApi from 'monaco-editor/esm/vs/editor/editor.api';

import { registerLanguage } from './helpers';
import {
LangModule as LangModuleType,
CompleteLangModule as CompleteLangModuleType,
} from './types';

export { BarePluginApi, registerLanguage, LangModuleType, CompleteLangModuleType };
export { BarePluginApi, registerLanguage };
export * from './types';
4 changes: 2 additions & 2 deletions packages/kbn-monaco/src/painless/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { ID } from './constants';
import { lexerRules, languageConfiguration } from './lexer_rules';
import { getSuggestionProvider, getSyntaxErrors } from './language';
import { CompleteLangModule as CompleteLangModuleType } from '../types';
import { CompleteLangModuleType } from '../types';

export const PainlessLang: CompleteLangModuleType = {
ID,
Expand All @@ -19,4 +19,4 @@ export const PainlessLang: CompleteLangModuleType = {
getSyntaxErrors,
};

export { PainlessContext, PainlessAutocompleteField } from './types';
export * from './types';
4 changes: 2 additions & 2 deletions packages/kbn-monaco/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
*/
import { monaco } from './monaco_imports';

export interface LangModule {
export interface LangModuleType {
ID: string;
lexerRules: monaco.languages.IMonarchLanguage;
languageConfiguration?: monaco.languages.LanguageConfiguration;
getSuggestionProvider?: Function;
getSyntaxErrors?: Function;
}

export interface CompleteLangModule extends LangModule {
export interface CompleteLangModuleType extends LangModuleType {
languageConfiguration: monaco.languages.LanguageConfiguration;
getSuggestionProvider: Function;
getSyntaxErrors: Function;
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-monaco/src/xjson/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
import './language';
import { ID } from './constants';
import { lexerRules, languageConfiguration } from './lexer_rules';
import { LangModule as LangModuleType } from '../types';
import { LangModuleType } from '../types';

export const XJsonLang: LangModuleType = { ID, lexerRules, languageConfiguration };

0 comments on commit e594dee

Please sign in to comment.