Skip to content

Commit 85bff8c

Browse files
committed
fix: Improve documentation
1 parent f435e19 commit 85bff8c

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

src/createLanguageClient.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ class MiddlewareMessageReader implements MessageReader {
6060
}
6161
}
6262

63+
/**
64+
* Add some hacks on transform for:
65+
* - Dedup server capability registrations (for omnisharp roslyn)
66+
* - Fix paths on windows
67+
* @param transports The original transports
68+
* @returns The transformed transports
69+
*/
6370
function hackTransports (transports: MessageTransports): MessageTransports {
6471
const existingRegistrations = new Set<string>()
6572
return {

src/services/CodinGameMonacoEnv.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,7 @@ import {
33
} from 'monaco-languageclient'
44

55
/**
6-
* Attempts to open a window and returns whether it succeeded. This technique is
7-
* not appropriate in certain contexts, like for example when the JS context is
8-
* executing inside a sandboxed iframe. If it is not necessary to know if the
9-
* browser blocked the new window, use {@link windowOpenNoOpener}.
10-
*
11-
* See https://github.com/microsoft/monaco-editor/issues/601
12-
* See https://github.com/microsoft/monaco-editor/issues/2474
13-
* See https://mathiasbynens.github.io/rel-noopener/
14-
*
15-
* @param url the url to open
16-
* @param noOpener whether or not to set the {@link window.opener} to null. You should leave the default
17-
* (true) unless you trust the url that is being opened.
18-
* @returns boolean indicating if the {@link window.open} call succeeded
6+
* This function comes from vscode: https://github.com/microsoft/vscode/blob/85bf8af5b9661b0c7f9587d33b3cb61499f6e4b8/src/vs/base/browser/dom.ts#L1282
197
*/
208
export function windowOpenWithSuccess (url: string, noOpener = true): boolean {
219
const newTab = window.open()

0 commit comments

Comments
 (0)