mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Upgrade typescript to 3.7 (#20375)
* Chore: Upgrade typescript to 3.7
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
"rollup-plugin-terser": "4.0.4",
|
||||
"rollup-plugin-typescript2": "0.19.3",
|
||||
"rollup-plugin-visualizer": "0.9.2",
|
||||
"typescript": "3.6.3"
|
||||
"typescript": "3.7.2"
|
||||
},
|
||||
"types": "src/index.ts"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ describe('Chart Tooltip', () => {
|
||||
// We need to mock getBoundingClientRect to return what DOM would actually return
|
||||
// when measuring tooltip container (wrapper with padding and content inside)
|
||||
Element.prototype.getBoundingClientRect = jest.fn(() => {
|
||||
return { width: 100, height: 100, top: 0, left: 0, bottom: 0, right: 0 };
|
||||
return { width: 100, height: 100, top: 0, left: 0, bottom: 0, right: 0 } as DOMRect;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -6,15 +6,10 @@ import { Editor as CoreEditor } from 'slate';
|
||||
import { Plugin as SlatePlugin } from '@grafana/slate-react';
|
||||
|
||||
import TOKEN_MARK from './slate-prism/TOKEN_MARK';
|
||||
import {
|
||||
makeFragment,
|
||||
TypeaheadOutput,
|
||||
CompletionItem,
|
||||
TypeaheadInput,
|
||||
SuggestionsState,
|
||||
CompletionItemGroup,
|
||||
} from '..';
|
||||
import { Typeahead } from '../components/Typeahead/Typeahead';
|
||||
import { CompletionItem, TypeaheadOutput, TypeaheadInput, SuggestionsState } from '../types/completion';
|
||||
import { makeFragment } from '../utils/slate';
|
||||
|
||||
export const TYPEAHEAD_DEBOUNCE = 100;
|
||||
|
||||
// Commands added to the editor by this plugin.
|
||||
@@ -23,13 +18,6 @@ interface SuggestionsPluginCommands {
|
||||
applyTypeahead: (suggestion: CompletionItem) => CoreEditor;
|
||||
}
|
||||
|
||||
export interface SuggestionsState {
|
||||
groupedItems: CompletionItemGroup[];
|
||||
typeaheadPrefix: string;
|
||||
typeaheadContext: string;
|
||||
typeaheadText: string;
|
||||
}
|
||||
|
||||
export function SuggestionsPlugin({
|
||||
onTypeahead,
|
||||
cleanText,
|
||||
|
||||
Reference in New Issue
Block a user