Skip to content

Commit ad912c3

Browse files
authored
chore(docs): add typeless package instructions (#2487)
1 parent 911caa2 commit ad912c3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

+11
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)