-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
2,247 additions
and
439 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { TextEdit } from '../common/text-edit'; | ||
import { Diagnostic } from './diagnostic'; | ||
|
||
export interface DiagnosticFix { | ||
export interface DiagnosticFix<T = TextEdit> { | ||
title: string; | ||
diagnostic: Diagnostic; | ||
isPreferred?: boolean; | ||
edits: TextEdit[]; | ||
edits: T[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Observable } from 'rxjs'; | ||
|
||
import { Document } from './document'; | ||
|
||
export interface DocumentCreated<T extends Document> { | ||
document: T; | ||
} | ||
|
||
export interface DocumentClosed { | ||
uri: string; | ||
} | ||
|
||
export interface DocumentOpened<T extends Document> { | ||
document: T; | ||
} | ||
|
||
export interface DocumentDeleted { | ||
uri: string; | ||
} | ||
|
||
export interface DocumentChanged<T extends Document> { | ||
document: T; | ||
} | ||
|
||
export interface DocumentAccessor<T extends Document = Document> { | ||
readonly created$: Observable<DocumentCreated<T>>; | ||
readonly closed$: Observable<DocumentClosed>; | ||
readonly opened$: Observable<DocumentOpened<T>>; | ||
readonly deleted$: Observable<DocumentDeleted>; | ||
readonly changed$: Observable<DocumentChanged<T>>; | ||
|
||
get(uri: string): Promise<T | undefined>; | ||
all(): Promise<T[]>; | ||
active(): Promise<T[]>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
import { Range } from '../common/range'; | ||
import { Document } from './document'; | ||
import { TextDocumentChange } from './text-document-change'; | ||
|
||
export interface DocumentChange { | ||
range?: Range; | ||
text: string; | ||
} | ||
|
||
export interface DocumentFactory<T extends Document> { | ||
create(uri: string, format: string, version: number, content: string): T; | ||
update(document: T, changes: readonly DocumentChange[], version: number): T; | ||
export interface DocumentFactory<TDoc extends Document = Document, TChange = TextDocumentChange> { | ||
create(uri: string, format: string, version: number, content: string): TDoc; | ||
update(document: TDoc, changes: readonly TChange[], version: number): TDoc; | ||
} |
Oops, something went wrong.