mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
fix(NA): @kbn/monaco types exports (#113937)
This commit is contained in:
parent
4243c57ee8
commit
e594deed5a
6 changed files with 10 additions and 13 deletions
|
@ -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';
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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,
|
||||
|
@ -19,4 +19,4 @@ export const PainlessLang: CompleteLangModuleType = {
|
|||
getSyntaxErrors,
|
||||
};
|
||||
|
||||
export { PainlessContext, PainlessAutocompleteField } from './types';
|
||||
export * from './types';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
import { monaco } from './monaco_imports';
|
||||
|
||||
export interface LangModule {
|
||||
export interface LangModuleType {
|
||||
ID: string;
|
||||
lexerRules: monaco.languages.IMonarchLanguage;
|
||||
languageConfiguration?: monaco.languages.LanguageConfiguration;
|
||||
|
@ -15,7 +15,7 @@ export interface LangModule {
|
|||
getSyntaxErrors?: Function;
|
||||
}
|
||||
|
||||
export interface CompleteLangModule extends LangModule {
|
||||
export interface CompleteLangModuleType extends LangModuleType {
|
||||
languageConfiguration: monaco.languages.LanguageConfiguration;
|
||||
getSuggestionProvider: Function;
|
||||
getSyntaxErrors: Function;
|
||||
|
|
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue