Skip to content

Commit d899c8d

Browse files
author
Lauro Silva
committed
dantecalderon-dan/update-migrating
1 parent a43202b commit d899c8d

File tree

3 files changed

+1468
-6
lines changed

3 files changed

+1468
-6
lines changed

AVANZADO.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ La mejor herramienta para crear bibliotecas React + TS en este momento es [`tsdx
8787
- [Sección 4: @types/react y @types/react-dom APIs](#sección-4-typesreact-y-typesreact-dom-apis)
8888
- [Agregando atributos no estandarizados](#agregando-atributos-no-estandarizados)
8989
- [@types/react-dom](#types-react-dom)
90-
</details>
90+
</details>
9191

9292
# Sección 0: Tipos de utilidad
9393

@@ -759,8 +759,7 @@ class DateIsInFutureError extends RangeError {}
759759
function parse(date: string) {
760760
if (!isValid(date))
761761
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");
764763
// ...
765764
}
766765

@@ -787,8 +786,7 @@ function parse(
787786
): Date | InvalidDateFormatError | DateIsInFutureError {
788787
if (!isValid(date))
789788
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");
792790
// ...
793791
}
794792

@@ -1171,7 +1169,7 @@ function assertIsString(val: any): asserts val is string {
11711169
function yell(str: any) {
11721170
assertIsString(str);
11731171

1174-
// Ahora Typescript sabe que 'str' es de tipo 'string'
1172+
// Ahora Typescript sabe que 'str' es de tipo 'string'
11751173
return str.toUppercase();
11761174
// ~~~~~~~~~~~
11771175
// error: La propiedad 'toUppercase' no existe el tipo 'string'.

0 commit comments

Comments
 (0)