Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Support default properties

Aperta
#41 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Non vengono indicati file, test o punti di ingresso. Inizia esaminando la progettazione delle proprietà del widget e della tipizzazione TypeScript, incluso il relativo issue di TypeScript Microsoft/TypeScript#16173; il lavoro è completato quando le proprietà del consumer sovrascrivono i valori predefiniti e il type guard di this.properties riflette le proprietà risultanti con i valori predefiniti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

@agubler commented on Wed Jul 26 2017

Enhancement

It could be useful for a widget author to be able to specify default properties that the consumer properties are mixed over ensuring that the this.properties type guard reflects the defaulted properties so that they are not assumed to be possibly undefined.


@pottedmeat commented on Thu Aug 17 2017

This could be helpful for the dgrid editing functionality where there is a set of properties that should be used across all instances - things like length, style, etc. - but each row has its own value.


@agubler commented on Fri Aug 18 2017

@pottedmeat unfortunately it's very difficult to provide the mechanism and support all the typings effectively at the moment.


@pottedmeat commented on Fri Aug 18 2017

That's fine, I was just outlining a use case.


@agubler commented on Fri Aug 18 2017

Of course, I think there are multiple use cases for default properties one of which is dgrid. Just wanted to let you know where I had got with trying to implement the feature... it led me down a rabbit hole of typings that I couldn't get quite right unfortunately.


@kitsonk commented on Tue Aug 29 2017

This seems to be related: Microsoft/TypeScript#16173

There appears to still be some challenges, though it seems like the problem space is better understood. We should think about it and try to make sure we have sufficient issues on TypeScript to help solve the problem (or support already existing ones).

Lingua principale
TypeScript
Stelle
622
Fork
80
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dojo/framework

Tutte le issue di dojo/framework

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.