style(typescript): fix errors from ts checks

This commit is contained in:
Jack Westbrook
2025-03-03 09:43:28 +01:00
parent b56928bc89
commit 2752ed52ff
3 changed files with 5 additions and 3 deletions
@@ -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 = {
+3 -2
View File
@@ -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');
}