Skip to content

Commit a43202b

Browse files
author
prettifier[bot]
authored
Format dce4369
1 parent dce4369 commit a43202b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

AVANZADO.md

+6-4
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,7 +759,8 @@ 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)) throw new DateIsInFutureError("la fecha es en el futuro");
762+
if (isInFuture(date))
763+
throw new DateIsInFutureError("la fecha es en el futuro");
763764
// ...
764765
}
765766

@@ -786,7 +787,8 @@ function parse(
786787
): Date | InvalidDateFormatError | DateIsInFutureError {
787788
if (!isValid(date))
788789
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");
790792
// ...
791793
}
792794

@@ -1169,7 +1171,7 @@ function assertIsString(val: any): asserts val is string {
11691171
function yell(str: any) {
11701172
assertIsString(str);
11711173

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

0 commit comments

Comments
 (0)