guardian / guardian/dotcom-rendering

Remove `index.d.ts`

Open
#7,638 3 comments 1 reaction 1 assignee Claimed by @frederickobrien View on GitHub
good first issue Pick me up Team Candidate: WebX
Dominant language
TypeScript
Stars
274
Forks
34
Avg merge
2d 22h
Merged PRs (30d)
121

Description

## Why?

Declaration files create ambient types, which appear in a global namespace across the project. We think it's preferable to avoid adding types to a global scope, and instead prefer to import them as needed.

## How?

Migrate the types in the `index.d.ts`[^1] file into normal `.ts` files, and import them as needed:

[^1]: https://github.com/guardian/dotcom-rendering/blob/4ea272b55efa01ba88f0f5ff60f6bc9d14198147/dotcom-rendering/index.d.ts

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.