Skip to content
This repository was archived by the owner on Feb 4, 2018. It is now read-only.

Commit 54a24fb

Browse files
author
blond
committed
docs(typescript): add info about typescript support
1 parent ffa8eea commit 54a24fb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Contents
2626
* [Install](#install)
2727
* [Usage](#usage)
2828
* [API](#api)
29+
* [TypeScript support](#typescript-support)
2930
* [Debuggability](#debuggability)
3031

3132
Install
@@ -311,6 +312,13 @@ BemEntityName.create({ block: 'my-button', mod: 'focused' });
311312
// ➜ BemEntityName { block: 'my-button', mod: { name: 'focused', val: true } }
312313
```
313314

315+
TypeScript support
316+
------------------
317+
318+
The package includes [typings](./index.d.ts) for TypeScript. You have to set up transpilation yourself. When you set `module` to `commonjs` in your `tsconfig.json` file, TypeScript will automatically find the type definitions for `@bem/entity-name`.
319+
320+
The interfaces are provided in global namespace `BemSDK.EntityName`. It is necessary to use interfaces in JsDoc.
321+
314322
Debuggability
315323
-------------
316324

0 commit comments

Comments
 (0)