style(typescript): fix errors from ts checks
This commit is contained in:
@@ -35,7 +35,7 @@ export interface State {
|
||||
|
||||
export class Typeahead extends PureComponent<Props, State> {
|
||||
static contextType = ThemeContext;
|
||||
context!: React.ContextType<typeof ThemeContext>;
|
||||
declare context: React.ContextType<typeof ThemeContext>;
|
||||
listRef = createRef<FixedSizeList>();
|
||||
|
||||
state: State = {
|
||||
|
||||
@@ -5,8 +5,9 @@ import { monacoLanguageRegistry } from '@grafana/data';
|
||||
export function setMonacoEnv() {
|
||||
self.MonacoEnvironment = {
|
||||
getWorker(_moduleId, label) {
|
||||
const getWorkerModule = (moduleUrl, label) => {
|
||||
return new Worker(self.MonacoEnvironment.getWorkerUrl(moduleUrl), {
|
||||
const getWorkerModule = (moduleUrl: string, label: string) => {
|
||||
const workerUrl = self.MonacoEnvironment!.getWorkerUrl!(moduleUrl, label);
|
||||
return new Worker(workerUrl, {
|
||||
name: label,
|
||||
type: 'module',
|
||||
});
|
||||
|
||||
@@ -22,6 +22,7 @@ import { logError, logInfo } from './utils';
|
||||
|
||||
// Loads near membrane custom formatter for near membrane proxy objects.
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// @ts-ignore - this is aliased in vite config but ts complains because it cannot resolve it.
|
||||
import('@locker/near-membrane-dom/custom-devtools-formatter');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user