From 88ad4c094d07d49329689c2a642c4aee601c059b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 Nov 2021 16:45:33 +0100 Subject: [PATCH] add mini readme for how to consume/add proposals, https://github.com/microsoft/vscode/issues/131165 --- src/vscode-dts/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/vscode-dts/README.md diff --git a/src/vscode-dts/README.md b/src/vscode-dts/README.md new file mode 100644 index 00000000000..37bf94a0b28 --- /dev/null +++ b/src/vscode-dts/README.md @@ -0,0 +1,20 @@ + +## vscode-dts + +This is the place for the stable API and for API proposals. + + +### Consume a proposal + +1. find a proposal you are interested in +1. add its name to your extensions `package.json#enabledApiProposals` property +1. run `npx vscode-dts dev` to download the `d.ts` files into your project +1. don't forget that extension using proposed API cannot be published +1. learn more here: https://code.visualstudio.com/api/advanced-topics/using-proposed-api + +### Add a new proposal + +1. create a _new_ file in this directory, its name must follow this pattern `vscode.proposed.[a-zA-Z]+.d.ts` +1. creating the proposal-file will automatically update `src/vs/workbench/services/extensions/common/extensionsApiProposals.ts` (make to run `yarn watch`) +1. declare and implement your proposal +1. make sure to use the `checkProposedApiEnabled` and/or `isProposedApiEnabled`-utils to enforce the API being proposed. Make sure to invoke them with your proposal's name which got generated into `extensionsApiProposals.ts`