diff --git a/README.md b/README.md index 4db9002..103ced1 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ types. - [`fromRange(range)`](#fromrangerange) - [`fromRelatedInformation(relatedInformation)`](#fromrelatedinformationrelatedinformation) - [`fromSelectionRange(selectionRange)`](#fromselectionrangeselectionrange) - - [`fromSelectionRanges(selectionRanges)`](#fromselectionrangesselectionranges) - [`fromSemanticTokens(semanticTokens)`](#fromsemantictokenssemantictokens) - [`fromSemanticTokensEdit(semanticTokensEdit)`](#fromsemantictokenseditsemantictokensedit) - [`fromSemanticTokensEdits(semanticTokensEdits)`](#fromsemantictokenseditssemantictokensedits) @@ -102,7 +101,6 @@ types. - [`toRange(range)`](#torangerange) - [`toRelatedInformation(relatedInformation)`](#torelatedinformationrelatedinformation) - [`toSelectionRange(selectionRange)`](#toselectionrangeselectionrange) - - [`toSelectionRanges(selectionRange)`](#toselectionrangesselectionrange) - [`toSemanticTokens(semanticTokens)`](#tosemantictokenssemantictokens) - [`toSemanticTokensEdit(semanticTokensEdit)`](#tosemantictokenseditsemantictokensedit) - [`toSemanticTokensEdits(semanticTokensDelta)`](#tosemantictokenseditssemantictokensdelta) @@ -612,19 +610,6 @@ Convert a Monaco editor selection range to an LSP selection range. The selection range as an LSP selection range (`lsp.SelectionRange`). -### `fromSelectionRanges(selectionRanges)` - -Convert Monaco editor selection ranges to an LSP selection ranges. - -#### Parameters - -- `selectionRanges` (`Array`) — the Monaco selections range to - convert - -#### Returns - -The selection ranges as LSP selection range (`lsp.SelectionRange | undefined`). - ### `fromSemanticTokens(semanticTokens)` Convert Monaco editor semantic tokens to LSP semantic tokens. @@ -1260,18 +1245,6 @@ Convert an LSP selection range to a Monaco editor selection range. The selection range as Monaco editor selection range (`monaco.languages.SelectionRange`). -### `toSelectionRanges(selectionRange)` - -Convert an LSP selection range to Monaco editor selection ranges. - -#### Parameters - -- `selectionRange` (`lsp.SelectionRange | undefined`) — the LSP selection range to convert - -#### Returns - -The selection range as Monaco editor selection ranges (`Array`). - ### `toSemanticTokens(semanticTokens)` Convert LSP semantic tokens to Monaco editor semantic tokens. diff --git a/src/index.ts b/src/index.ts index 37a5402..8aefd63 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,7 +34,6 @@ export { fromParameterInformation, toParameterInformation } from './parameterInf export { fromPosition, toPosition } from './position.js' export { fromRange, toRange } from './range.js' export { fromRelatedInformation, toRelatedInformation } from './relatedInformation.js' -export { fromSelectionRange, toSelectionRange } from './selectionRange.js' export { fromSelectionRanges, toSelectionRanges } from './selectionRanges.js' export { fromSemanticTokens, toSemanticTokens } from './semanticTokens.js' export { fromSemanticTokensEdit, toSemanticTokensEdit } from './semanticTokensEdit.js' diff --git a/src/selectionRange.ts b/src/selectionRange.ts deleted file mode 100644 index 7bc2bfa..0000000 --- a/src/selectionRange.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type * as monaco from 'monaco-types' -import type * as lsp from 'vscode-languageserver-protocol' - -import { fromRange, toRange } from './range.js' - -/** - * Convert a Monaco editor selection range to an LSP selection range. - * - * @param selectionRange - * The Monaco selection range to convert. - * @returns - * The selection range as an LSP selection range. - * @deprecated - * Use `fromSelectionRanges` instead. - */ -export function fromSelectionRange( - selectionRange: monaco.languages.SelectionRange -): lsp.SelectionRange { - return { - range: fromRange(selectionRange.range) - } -} - -/** - * Convert an LSP selection range to a Monaco editor selection range. - * - * @param selectionRange - * The LSP selection range to convert. - * @returns - * The selection range as Monaco editor selection range. - * @deprecated - * Use `toSelectionRanges` instead. - */ -export function toSelectionRange( - selectionRange: lsp.SelectionRange -): monaco.languages.SelectionRange { - return { - range: toRange(selectionRange.range) - } -} diff --git a/test/selectionRange.test.ts b/test/selectionRange.test.ts deleted file mode 100644 index 2e14934..0000000 --- a/test/selectionRange.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { runTests } from './utils.js' -import { fromSelectionRange, toSelectionRange } from '../src/index.js' - -runTests( - fromSelectionRange, - toSelectionRange -)({ - lsp: { range: { start: { line: 0, character: 10 }, end: { line: 2, character: 20 } } }, - monaco: { range: { startLineNumber: 1, startColumn: 11, endLineNumber: 3, endColumn: 21 } } -})