Skip to content

Commit

Permalink
docs: update attribute name from SyntaxContextType to EntityContextTy…
Browse files Browse the repository at this point in the history
…pe in README (#149)

- Corrected the attribute name 'SyntaxContextType' to 'EntityContextType' in the README
- Ensures documentation is consistent with the latest API
  • Loading branch information
resetsix authored Nov 14, 2024
1 parent 3275599 commit d51b522
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ npm install monaco-sql-languages
LanguageIdEnum,
CompletionService,
ICompletionItem,
SyntaxContextType
EntityContextType
} from 'monaco-sql-languages';
const completionService: CompletionService = function (
Expand All @@ -125,11 +125,11 @@ npm install monaco-sql-languages
let syntaxCompletionItems: ICompletionItem[] = [];
syntax.forEach((item) => {
if (item.syntaxContextType === SyntaxContextType.DATABASE) {
if (item.syntaxContextType === EntityContextType.DATABASE) {
const databaseCompletions: ICompletionItem[] = []; // some completions about databaseName
syntaxCompletionItems = [...syntaxCompletionItems, ...databaseCompletions];
}
if (item.syntaxContextType === SyntaxContextType.TABLE) {
if (item.syntaxContextType === EntityContextType.TABLE) {
const tableCompletions: ICompletionItem[] = []; // some completions about tableName
syntaxCompletionItems = [...syntaxCompletionItems, ...tableCompletions];
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ npm install monaco-sql-languages
LanguageIdEnum,
CompletionService,
ICompletionItem,
SyntaxContextType
EntityContextType
} from 'monaco-sql-languages';
const completionService: CompletionService = function (
Expand All @@ -125,11 +125,11 @@ npm install monaco-sql-languages
let syntaxCompletionItems: ICompletionItem[] = [];
syntax.forEach((item) => {
if (item.syntaxContextType === SyntaxContextType.DATABASE) {
if (item.syntaxContextType === EntityContextType.DATABASE) {
const databaseCompletions: ICompletionItem[] = []; // some completions about databaseName
syntaxCompletionItems = [...syntaxCompletionItems, ...databaseCompletions];
}
if (item.syntaxContextType === SyntaxContextType.TABLE) {
if (item.syntaxContextType === EntityContextType.TABLE) {
const tableCompletions: ICompletionItem[] = []; // some completions about tableName
syntaxCompletionItems = [...syntaxCompletionItems, ...tableCompletions];
}
Expand Down

0 comments on commit d51b522

Please sign in to comment.