Skip to content

Commit dc81ceb

Browse files
committed
update docusaurus
1 parent fbd7385 commit dc81ceb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/src/pages/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,15 +396,15 @@ transformUserInput({
396396
When applicable use **discriminated union type** to eliminate optional args, which will decrease complexity on function API and only necessary/required args will be passed depending on its use case.
397397
398398
```ts
399-
// ❌ Avoid optional args as they increase complexity of function API
399+
// ❌ Avoid optional properties as they increase complexity of function API
400400
type StatusParams = {
401401
data?: Products;
402402
title?: string;
403403
time?: number;
404404
error?: string;
405405
};
406406

407-
// ✅ Strive to have majority of args required, if that's not possible,
407+
// ✅ Strive to have majority of properties required, if that's not possible,
408408
// use discriminated union for clear intent on function usage
409409
type StatusSuccessParams = {
410410
status: 'success';

0 commit comments

Comments
 (0)