【发布时间】:2023-03-03 22:13:01
【问题描述】:
在代码示例 (catcoding) 中,支持 webview 逻辑被编写为 JavaScript 中的匿名函数,但是我想在 Typescript 中构建这个支持逻辑。
我已经厌倦了用 requireJS 将这个逻辑重现为 typescript 包,但我无法让它工作。
// This script will be run within the webview itself
// It cannot access the main VS Code APIs directly.
(function () {
const vscode = acquireVsCodeApi();
…
}();
我希望在 TypeScript 中构建这个支持 WebView 逻辑,以便获得静态类型检查。
【问题讨论】:
标签: typescript visual-studio-code vscode-extensions