Chore: Upgrade typescript to 3.7 (#20375)

* Chore: Upgrade typescript to 3.7
This commit is contained in:
kay delaney
2019-11-15 09:18:09 +00:00
committed by GitHub
parent d4e013fd44
commit f1c8330877
14 changed files with 80 additions and 68 deletions

View File

@@ -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"
}

View File

@@ -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;
});
});

View File

@@ -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,