microsoft / microsoft/TypeScript
Specialize JSX error messages for missing properties
Aperta
@weswigham ci sta già lavorando.
Dal 25/7/2020.
Domain: Error Messages
Domain: JSX/TSX
Effort: Moderate
Experience Enhancement
Help Wanted
Rescheduled
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
import React from "react";
function Foo(props: { count: number }) {
return <div>{props.count}</div>;
}
<Foo />
function Bar(props: { a: any, b: any }) {
return <div />;
}
<Bar />
function Baz(props: { a: any, b: any, c: any, d: any, e: any, f: any }) {
return <div />
}
<Baz />
Current
Property 'count' is missing in type '{}' but required in type '{ count: number; }'.
Type '{}' is missing the following properties from type '{ a: any; b: any; }': a, b
Type '{}' is missing the following properties from type '{ a: any; b: any; c: any; d: any; e: any; f: any; }': a, b, c, d, and 2 more.
Proposed
The 'count' attribute is missing, but is required for this 'Foo' tag.
This 'Bar' tag is missing the following attributes: a, b.
This 'Baz' tag is missing the following attributes: a, b, c, d, and 2 more.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.