Skip to content

Commit 95bb2aa

Browse files
committed
Improve TS checking in uriTransformer.js
1 parent 4928dcd commit 95bb2aa

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/vs/server/uriTransformer.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,18 @@
1414
* | file | vscode-local |
1515
* --------------------------------
1616
* ```
17+
* @typedef { import('../base/common/uriIpc').IRawURITransformer } IRawURITransformer
18+
* @typedef { import('../base/common/uriIpc').UriParts } UriParts
19+
* @typedef { import('../base/common/uri').UriComponents } UriComponents
20+
* @param {string} remoteAuthority
21+
* @returns {IRawURITransformer}
1722
*/
1823
module.exports = function(remoteAuthority) {
1924
return {
25+
/**
26+
* @param {UriParts} uri
27+
* @returns {UriParts}
28+
*/
2029
transformIncoming: (uri) => {
2130
if (uri.scheme === 'vscode-remote') {
2231
return { scheme: 'file', path: uri.path };
@@ -26,7 +35,10 @@ module.exports = function(remoteAuthority) {
2635
}
2736
return uri;
2837
},
29-
38+
/**
39+
* @param {UriParts} uri
40+
* @returns {UriParts}
41+
*/
3042
transformOutgoing: (uri) => {
3143
if (uri.scheme === 'file') {
3244
return { scheme: 'vscode-remote', authority: remoteAuthority, path: uri.path };
@@ -36,7 +48,10 @@ module.exports = function(remoteAuthority) {
3648
}
3749
return uri;
3850
},
39-
51+
/**
52+
* @param {string} scheme
53+
* @returns {string}
54+
*/
4055
transformOutgoingScheme: (scheme) => {
4156
if (scheme === 'file') {
4257
return 'vscode-remote';

0 commit comments

Comments
 (0)