Closed as not planned
Description
React version: all
Steps To Reproduce
- Import React from "npm:react" inside Deno
- Observe that React is not defined in TypeScript
Code example:
import * as React from "npm:react";
// here React is not defined in typescript, we need to add @types/react
/* @deno-types="@types/react" */
import * as React from "npm:react";
The current behavior
React is not defined in TypeScript when importing it from "npm:react".
The expected behavior
React (and react-dom) should ship with types, at least in a .d.mts form, so that users don't have to bother adding types manually. As TypeScript is now widely used, React should provide first-class TypeScript support.
Related issue: denoland/deno#18203 but the solution we have doesn't address the issue directly. Maybe React should ship types and not the @DefinitelyTyped org.