Opt-out instead of opt-in for included types

This commit is contained in:
Andreas Hocevar
2021-07-10 11:33:01 +02:00
parent cb4d5a7107
commit 9e88134286
3 changed files with 15 additions and 15 deletions
+1 -14
View File
@@ -105,20 +105,7 @@ The untranspiled sources in the `src/` folder are JSDoc type annotated. For appl
## TypeScript support
When authoring in TypeScript, we recommend you try out the types that are included in the `ol` package. To use these types, add the following entry for `@types/ol` to your `package.json`'s `devDependencies` section:
```
{
...
"devDependencies": {
...
"@types/ol": "file:node_modules/ol/types",
...
}
}
```
Make sure to run `npm install` before and after adding that entry.
These types are auto-generated by the TypeScript compiler, and will be the only type source in future versions. For now, you can still use third-party types from [Definitely Typed](https://definitelytyped.org) (`npm install @types/ol`) or from [hanreev/types-ol](https://github.com/hanreev/types-ol).
The [ol package](https://npmjs.com/package/ol) includes auto-generated TypeScript declarations as `*.d.ts` files.
## Supported Browsers