Use const assertion instead of type assertion (#75165)

This commit is contained in:
Fabrizio 2023-09-20 16:31:09 +02:00 committed by GitHub
parent b38454d81b
commit d1296f7213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -4168,9 +4168,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/datasource/tempo/traceql/autocomplete.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/testdata/ConfigEditor.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],

View File

@ -340,7 +340,7 @@ export class CompletionProvider implements monacoTypes.languages.CompletionItemP
const functions = CompletionProvider.functions.map((key) => ({
...key,
insertTextRules: this.monaco?.languages.CompletionItemInsertTextRule?.InsertAsSnippet,
type: 'FUNCTION' as CompletionType,
type: 'FUNCTION' as const,
}));
const tags = this.getScopesCompletions()
.concat(this.getIntrinsicsCompletions())