Skip to content

Commit 265cf66

Browse files
authored
Updates to Affix section in remapping.md
Fix typo and merge sentences for improved clarity and flow in Affix function description.
1 parent 43db447 commit 265cf66

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/patterns/remapping.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ new Elysia()
4343
Remap function can be use with `state`, `decorate`, `model`, `derive` to helps you define a correct property name and preventing name collision.
4444

4545
## Affix
46-
The provide a smoother experience, some plugins might have a lot of property value which can be overwhelming to remap one-by-one.
46+
To provide a smoother experience, some plugins might have a lot of property value which can be overwhelming to remap one-by-one.
4747

48-
The **Affix** function which consists of **prefix** and **suffix**, allowing us to remap all property of an instance.
48+
The **Affix** function, which consists of a **prefix** and **suffix**, allows us to effortlessly remap all properties of an instance, preventing the name collision of the plugin.
4949

5050
```ts
5151
const setup = new Elysia({ name: 'setup' })
@@ -63,8 +63,6 @@ const app = new Elysia()
6363
.get('/', ({ setupCarbon }) => setupCarbon)
6464
```
6565

66-
Allowing us to bulk remap a property of the plugin effortlessly, preventing the name collision of the plugin.
67-
6866
By default, **affix** will handle both runtime, type-level code automatically, remapping the property to camelCase as naming convention.
6967

7068
In some condition, you can also remap `all` property of the plugin:

0 commit comments

Comments
 (0)