@@ -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,8 +759,7 @@ 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 ))
763
- throw new DateIsInFutureError (" la fecha es en el futuro" );
762
+ if (isInFuture (date )) throw new DateIsInFutureError (" la fecha es en el futuro" );
764
763
// ...
765
764
}
766
765
@@ -787,8 +786,7 @@ function parse(
787
786
): Date | InvalidDateFormatError | DateIsInFutureError {
788
787
if (! isValid (date ))
789
788
return new InvalidDateFormatError (" no es un formato de fecha válido" );
790
- if (isInFuture (date ))
791
- return new DateIsInFutureError (" la fecha es en el futuro" );
789
+ if (isInFuture (date )) return new DateIsInFutureError (" la fecha es en el futuro" );
792
790
// ...
793
791
}
794
792
@@ -1171,7 +1169,7 @@ function assertIsString(val: any): asserts val is string {
1171
1169
function yell(str : any ) {
1172
1170
assertIsString (str );
1173
1171
1174
- // Ahora Typescript sabe que 'str' es de tipo 'string'
1172
+ // Ahora Typescript sabe que 'str' es de tipo 'string'
1175
1173
return str .toUppercase ();
1176
1174
// ~~~~~~~~~~~
1177
1175
// error: La propiedad 'toUppercase' no existe el tipo 'string'.
0 commit comments