my-awesome-typescript-project / src/declaration
Sample declaration file.
- Declaration files provides a way to declare types or values without providing implementations.
*.tsfiles are implementation files that can contain types and executable code.*.d.tsfiles are declaration files that contain only type information.- Best practice is of course to manage declarations files instead of letting tsc generate them.
- For instance, interface anotherShape is missing from the tsc emitted declaration file (see below).
| Namespace | Description |
|---|---|
| anotherNamespace | Namespace declaration. |
Defined in: src/declaration.d.ts:16
Interface declaration.
| Property | Type | Defined in |
|---|---|---|
aye |
string |
src/declaration.d.ts:17 |
bee |
number |
src/declaration.d.ts:18 |
type returnVoid = returnVoid;Defined in: src/declaration.d.ts:25
Type declaration.