Skip to content

Commit b5431b1

Browse files
committed
doc tweaks
1 parent 322d2b1 commit b5431b1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: docs/content/development/hacking-on-gitea.en-us.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,17 @@ make lint-frontend
195195

196196
Gitea is in the process of migrating to type-safe Typescript. Here are some specific guidelines regarding Typescript in the codebase:
197197

198-
### Use `@ts-expect-error` instead of `@ts-ignore`
199-
200-
Both annotations should be avoided, but if you have to use them, use `@ts-expect-error` because it will not leave ineffective statements after the issue is fixed.
201-
202198
### Use type aliases instead of interfaces
203199

204200
Prefer to use type aliases because they can represent any type and are generally more flexible to use than interfaces.
205201

206-
### Use explicit type imports and exports
202+
### Use separate type imports
207203

208-
We use `verbatimModuleSyntax` so type imports and exports must be performed using `export type` and `import type` statements. Imports must be split from other imports from the same file which will then enable the typescript compiler to completely eliminate the statements during compilation.
204+
We use `verbatimModuleSyntax` so type imports and non-type imports from the same file must be split into two `import type` statements. This enables the typescript compiler to completely eliminate the type import statements during compilation.
205+
206+
### Use `@ts-expect-error` instead of `@ts-ignore`
207+
208+
Both annotations should be avoided, but if you have to use them, use `@ts-expect-error` because it will not leave ineffective statements after the issue is fixed.
209209

210210
### Configuring local ElasticSearch instance
211211

0 commit comments

Comments
 (0)