@@ -87,7 +87,7 @@ La mejor herramienta para crear bibliotecas React + TS en este momento es [`tsdx
87
87
- [ Sección 4: @types/react y @types/react-dom APIs] ( #sección-4-typesreact-y-typesreact-dom-apis )
88
88
- [ Agregando atributos no estandarizados] ( #agregando-atributos-no-estandarizados )
89
89
- [ @types/react-dom ] ( #types-react-dom )
90
- </details >
90
+ </details >
91
91
92
92
# Sección 0: Tipos de utilidad
93
93
@@ -759,7 +759,8 @@ class DateIsInFutureError extends RangeError {}
759
759
function parse(date : string ) {
760
760
if (! isValid (date ))
761
761
throw new InvalidDateFormatError (" no es un formato de fecha válido" );
762
- if (isInFuture (date )) throw new DateIsInFutureError (" la fecha es en el futuro" );
762
+ if (isInFuture (date ))
763
+ throw new DateIsInFutureError (" la fecha es en el futuro" );
763
764
// ...
764
765
}
765
766
@@ -786,7 +787,8 @@ function parse(
786
787
): Date | InvalidDateFormatError | DateIsInFutureError {
787
788
if (! isValid (date ))
788
789
return new InvalidDateFormatError (" no es un formato de fecha válido" );
789
- if (isInFuture (date )) return new DateIsInFutureError (" la fecha es en el futuro" );
790
+ if (isInFuture (date ))
791
+ return new DateIsInFutureError (" la fecha es en el futuro" );
790
792
// ...
791
793
}
792
794
@@ -1169,7 +1171,7 @@ function assertIsString(val: any): asserts val is string {
1169
1171
function yell(str : any ) {
1170
1172
assertIsString (str );
1171
1173
1172
- // Ahora Typescript sabe que 'str' es de tipo 'string'
1174
+ // Ahora Typescript sabe que 'str' es de tipo 'string'
1173
1175
return str .toUppercase ();
1174
1176
// ~~~~~~~~~~~
1175
1177
// error: La propiedad 'toUppercase' no existe el tipo 'string'.
0 commit comments