Skip to content

Commit dbae273

Browse files
filipesilvaDanny Blue
authored and
Danny Blue
committed
chore(docs): add typeless package instructions (angular#2487)
1 parent d11e2cb commit dbae273

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,17 @@ npm install d3 --save
343343
npm install @types/d3 --save-dev
344344
```
345345

346+
If the library doesn't have typings available at `@types/`, you can still use it by
347+
manually adding typings for it:
348+
```
349+
// in src/typings.d.ts
350+
declare module 'typeless-package';
351+
352+
// in src/app/app.component.ts
353+
import * as typelessPackage from 'typeless-package';
354+
typelessPackage.method();
355+
```
356+
346357
### Global Library Installation
347358

348359
Some javascript libraries need to be added to the global scope, and loaded as if

0 commit comments

Comments
 (0)