chore: update typings docs (#6704)

This commit is contained in:
Beka Westberg
2022-12-15 01:07:37 +00:00
committed by GitHub
parent 3be3d4a6ff
commit 73cdc7410f

View File

@@ -1,13 +1,5 @@
# blockly.d.ts
This directory contains hand-crafted typings for places where the Blockly
library isn't yet converted to typescript.
This ``blockly.d.ts`` file describes the TypeScript type definitions for Blockly.
If you consume Blockly through ``npm``, this file is already included in the ``npm`` package.
Otherwise, you can include a copy of this file with your sources and reference it through a [Triple-Slash directive](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html).
## Generating a new version
To generate a new version of the Typings file, from the Blockly root directory run ``npm run typings``.
You will need to run ``npm install`` for this to work.
Note: In order to check for errors in the typings file, run ``tsc`` in the ``typings/`` directory.
These are added to the generated typings as part of the package step. I.e.
`npm run package`.