Skip to content

Commit 13175c6

Browse files
committed
Avoid the TypeScript declare keyword
This can be unsafe to use.
1 parent 08da02c commit 13175c6

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/completion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ const defaultFromCompletionItemKind: NonNullable<
7777
}
7878
}
7979

80-
export declare namespace createCompletionSource {
81-
interface Options extends fromMarkupContent.Options {
80+
export namespace createCompletionSource {
81+
export interface Options extends fromMarkupContent.Options {
8282
/**
8383
* Convert an LSP completion item kind to a CodeMirror completion type.
8484
*

src/hover-tooltip.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { fromMarkupContent } from './markup-content.js'
66
import { getTextDocument } from './text-document.js'
77
import { type LSPResult } from './types.js'
88

9-
export declare namespace createHoverTooltipSource {
10-
interface Options extends fromMarkupContent.Options {
9+
export namespace createHoverTooltipSource {
10+
export interface Options extends fromMarkupContent.Options {
1111
/**
1212
* Provide LSP hover info.
1313
*

src/lint.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const defaultFormatSource: NonNullable<createLintSource.Options['formatSource']>
1818
}
1919
}
2020

21-
export declare namespace createLintSource {
22-
interface Options {
21+
export namespace createLintSource {
22+
export interface Options {
2323
/**
2424
* Provide LSP diagnostics.
2525
*

src/markup-content.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ async function processMarkdown(
3333
}
3434
}
3535

36-
export declare namespace fromMarkupContent {
37-
interface Options {
36+
export namespace fromMarkupContent {
37+
export interface Options {
3838
/**
3939
* Convert a markdown string to DOM.
4040
*

0 commit comments

Comments
 (0)