Skip to content

Commit

Permalink
refactor: remove useless types
Browse files Browse the repository at this point in the history
  • Loading branch information
viladimiru committed Dec 4, 2023
1 parent 073dd4d commit a0c5cdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/autocomplete/lib/parsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ export function initSharedAutocomplete(parser: ParserContext): void {
}
parser.suggestColumns();
parser.suggestFunctions();
let keywords: Array<KeywordSuggestion | string> = [
let keywords: KeywordSuggestion[] = [
{value: 'CASE', weight: 450},
{value: 'FALSE', weight: 450},
{value: 'NULL', weight: 450},
Expand Down Expand Up @@ -798,10 +798,10 @@ export function initSharedAutocomplete(parser: ParserContext): void {
}
};

parser.mergeSuggestKeywords = function (...args: Array<KeywordSuggestion | string>): {
parser.mergeSuggestKeywords = function (...args: KeywordSuggestion[]): {
suggestKeywords?: KeywordSuggestion[];
} {
let result: Array<KeywordSuggestion | string> = [];
let result: KeywordSuggestion[] = [];
Array.prototype.slice.call(args).forEach((suggestion) => {
if (
typeof suggestion !== 'undefined' &&
Expand Down
4 changes: 2 additions & 2 deletions src/autocomplete/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export interface ParserContext {
mergeSuggestKeywords(): void;
suggestValueExpressionKeywords(
valueExpression: ValueExpression,
extras: Array<KeywordSuggestion | string>,
extras: KeywordSuggestion[],
): void;
addColRefIfExists(valueExpression: ValueExpression): void;
getValueExpressionKeywords(
Expand Down Expand Up @@ -441,7 +441,7 @@ export interface ValueExpression {
types?: string[];
columnReference?: ColumnReference[];
function?: string;
suggestKeywords?: Array<KeywordSuggestion | string>;
suggestKeywords?: KeywordSuggestion[];
lastType?: ValueExpression;
cursorAtStart?: boolean;
inValueEdit?: boolean;
Expand Down

0 comments on commit a0c5cdb

Please sign in to comment.