Skip to content

Commit

Permalink
add mini readme for how to consume/add proposals, #131165
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 12, 2021
1 parent 9b1d819 commit 88ad4c0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/vscode-dts/README.md
Original file line number Diff line number Diff line change
@@ -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`)

This comment has been minimized.

Copy link
@gjsjohnmurray

gjsjohnmurray Nov 12, 2021

Contributor

'make to run' -> 'make sure to run' ?

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`

0 comments on commit 88ad4c0

Please sign in to comment.