@@ -334,8 +334,7 @@ Adding `as` to guard is useful, because it allow us to apply multiple hooks resp
334334
335335However, it also allows us to apply ` schema ` to ensure type safety for all the routes at once.
336336
337- ``` typescript twoslash
338- // @errors: 2304 2345
337+ ``` typescript
339338import { Elysia , t } from ' elysia'
340339
341340const plugin = new Elysia ()
@@ -363,8 +362,7 @@ To apply to the parent instance, we need to **"lift the scope up** to the parent
363362
364363We can achieve this by casting it `** as('plugin')** .
365364
366- ``` typescript twoslash
367- // @errors: 2304 2345
365+ ``` typescript
368366import { Elysia , t } from ' elysia'
369367
370368const plugin = new Elysia ()
@@ -391,8 +389,7 @@ The `as` cast will lift all an instance's scope up.
391389How it work is that, it read all hooks and schema scope, and lift it up to the parent instance.
392390
393391Which means if you have ` local ` scope, and want to apply it to the parent instance, you can use ` as('plugin') ` to lift it up.
394- ``` typescript twoslash
395- // @errors: 2304 2345
392+ ``` typescript
396393import { Elysia , t } from ' elysia'
397394
398395const plugin = new Elysia ()
@@ -421,8 +418,7 @@ This will cast **guard's response** and **onBeforeHandle** as `scoped` thus lift
421418- ` plugin ` cast event to ** scoped**
422419- ` global ` cast event to ** global**
423420
424- ``` typescript twoslash
425- // @errors: 2304 2345
421+ ``` typescript
426422import { Elysia , t } from ' elysia'
427423
428424const plugin = new Elysia ()
@@ -475,8 +471,7 @@ In Elysia 1.0, Elysia will prefers either one of the schema from the scope, and
475471
476472However, on Elysia 1.1, Elysia will try to reconcile response schema from all scope from each status code and merge them together.
477473
478- ``` typescript twoslash
479- // @errors: 2304 2345
474+ ``` typescript
480475import { Elysia , t } from ' elysia'
481476
482477const plugin = new Elysia ()
0 commit comments