mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-03-25 02:32:52 -05:00
docs: fix formatting in packages/core/types/README (#3292)
* docs: fix formatting in packages/core/types/README * format Co-authored-by: Juan Picado <juanpicado19@gmail.com>
This commit is contained in:
parent
e21ccea3a1
commit
bbf897d05a
1 changed files with 18 additions and 25 deletions
|
@ -1,42 +1,35 @@
|
|||
# Typescript types for Verdaccio
|
||||
# TypeScript types for Verdaccio
|
||||
|
||||
Typescript definitions for verdaccio plugins and internal code
|
||||
TypeScript definitions for Verdaccio plugins and internal code.
|
||||
|
||||
# Typescript
|
||||
# TypeScript
|
||||
|
||||
For usage with the library, the `tsconfig.json` should looks like this.
|
||||
|
||||
```
|
||||
//tsconfig.json
|
||||
```json5
|
||||
// tsconfig.json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "commonjs",
|
||||
"declaration": true,
|
||||
"noImplicitAny": false,
|
||||
"strict": true,
|
||||
"outDir": "lib",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"typeRoots": [
|
||||
"./node_modules/@verdaccio/types/lib/verdaccio",
|
||||
"./node_modules/@types"
|
||||
]
|
||||
compilerOptions: {
|
||||
target: 'esnext',
|
||||
module: 'commonjs',
|
||||
declaration: true,
|
||||
noImplicitAny: false,
|
||||
strict: true,
|
||||
outDir: 'lib',
|
||||
allowSyntheticDefaultImports: true,
|
||||
esModuleInterop: true,
|
||||
typeRoots: ['./node_modules/@verdaccio/types/lib/verdaccio', './node_modules/@types'],
|
||||
},
|
||||
"include": [
|
||||
"src/*.ts",
|
||||
"types/*.d.ts"
|
||||
]
|
||||
include: ['src/*.ts', 'types/*.d.ts'],
|
||||
}
|
||||
```
|
||||
|
||||
### Imports
|
||||
|
||||
```
|
||||
```ts
|
||||
import type {ILocalData, LocalStorage, Logger, Config} from '@verdaccio/types';
|
||||
|
||||
class LocalData implements ILocalData {
|
||||
|
||||
class LocalData implements ILocalData {
|
||||
path: string;
|
||||
logger: Logger;
|
||||
data: LocalStorage;
|
||||
|
|
Loading…
Add table
Reference in a new issue