Update sample to use 1.46 types

This commit is contained in:
Matt Bierner
2020-06-11 13:39:56 -07:00
parent b5742ed3d9
commit 15bf6474f6
5 changed files with 9 additions and 2106 deletions

View File

@ -5,7 +5,7 @@
Demonstrates VS Code's [custom editor API](https://code.visualstudio.com/api/extension-guides/custom-editors) using two custom editors:
- Cat Scratch — Uses the finalized custom text editor api to provide a custom editor for `.cscratch` files (which are just json files)
- Paw Draw - Uses the proposed binary custom editor api to provide a custom editor for `.pawdraw` files (which are just jpeg files with a different file extension). **Note that this sample requires VS Code 1.45+**
- Paw Draw - Uses the binary custom editor api to provide a custom editor for `.pawdraw` files (which are just jpeg files with a different file extension).
## VS Code API
@ -17,7 +17,7 @@ Demonstrates VS Code's [custom editor API](https://code.visualstudio.com/api/ext
## Running the example
- Open this example in VS Code 1.44+ (note that the custom binary editor requires VS Code 1.45+)
- Open this example in VS Code 1.46+
- `npm install`
- `npm run watch` or `npm run compile`
- `F5` to start debugging

View File

@ -55,9 +55,9 @@
"dev": true
},
"@types/vscode": {
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.44.0.tgz",
"integrity": "sha512-WJZtZlinE3meRdH+I7wTsIhpz/GLhqEQwmPGeh4s1irWLwMzCeTV8WZ+pgPTwrDXoafVUWwo1LiZ9HJVHFlJSQ==",
"version": "1.46.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.46.0.tgz",
"integrity": "sha512-8m9wPEB2mcRqTWNKs9A9Eqs8DrQZt0qNFO8GkxBOnyW6xR//3s77SoMgb/nY1ctzACsZXwZj3YRTDsn4bAoaUw==",
"dev": true
},
"@typescript-eslint/eslint-plugin": {

View File

@ -6,7 +6,7 @@
"enableProposedApi": true,
"publisher": "vscode-samples",
"engines": {
"vscode": "^1.44.0"
"vscode": "^1.46.0"
},
"categories": [
"Other"
@ -50,7 +50,7 @@
},
"devDependencies": {
"@types/node": "^12.12.0",
"@types/vscode": "^1.44.0",
"@types/vscode": "^1.46.0",
"@typescript-eslint/eslint-plugin": "^3.0.2",
"@typescript-eslint/parser": "^3.0.2",
"eslint": "^7.1.0",

View File

@ -189,7 +189,7 @@ export class PawDrawEditorProvider implements vscode.CustomEditorProvider<PawDra
public static register(context: vscode.ExtensionContext): vscode.Disposable {
return vscode.window.registerCustomEditorProvider(
PawDrawEditorProvider.viewType,
new PawDrawEditorProvider(context) as any,
new PawDrawEditorProvider(context),
{
// For this demo extension, we enable `retainContextWhenHidden` which keeps the
// webview alive even when it is not visible. You should avoid using this setting
@ -198,7 +198,7 @@ export class PawDrawEditorProvider implements vscode.CustomEditorProvider<PawDra
retainContextWhenHidden: true,
},
supportsMultipleEditorsPerDocument: false,
} as any);
});
}
private static readonly viewType = 'catCustoms.pawDraw';

File diff suppressed because it is too large Load Diff