Skip to content

Commit 5f734d0

Browse files
add necessary comment and fix typo
1 parent 112e53a commit 5f734d0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

client/src/htmlMain.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace ColorSymbolRequest {
1111
export function activate (context: ExtensionContext) {
1212

1313
// The server is implemented in node
14-
const serverModule = require.resolve('vue-langauge-server');
14+
const serverModule = require.resolve('vue-language-server');
1515
// The debug options for the server
1616
const debugOptions = { execArgv: ['--nolazy', '--debug=6005'] };
1717

server/src/modes/script/bridge.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// this bridge file will be injected into TypeScript service
2+
// it enable type checking and completion, yet still preserve precise option type
3+
14
export const moduleName = 'vue-editor-bridge';
25

36
export const fileName = 'vue-temp/vue-editor-bridge.ts';

server/src/modes/script/typescript.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ function modifyVueSource (sourceFile: ts.SourceFile): void {
6262
setZeroPos(ts.createLiteral('vue-editor-bridge'))));
6363
sourceFile.statements.unshift(vueImport);
6464

65-
// 2. find the export default and wrap it in `new Vue(...)` if it exists and is an object literal
66-
// (the span of the wrapping construct call and *all* its members must be the same as the object literal it wraps)
65+
// 2. find the export default and wrap it in `__vueEditorBridge(...)` if it exists and is an object literal
66+
// (the span of the function construct call and *all* its members must be the same as the object literal it wraps)
6767
const objectLiteral = (exportDefaultObject as ts.ExportAssignment).expression as ts.ObjectLiteralExpression;
6868
const setObjPos = getWrapperRangeSetter(objectLiteral);
6969
const vue = ts.setTextRange(ts.createIdentifier('__vueEditorBridge'), { pos: objectLiteral.pos, end: objectLiteral.pos + 1 });

0 commit comments

Comments
 (0)