0
Fork 0
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:
NotWearingPants 2022-08-08 19:48:42 +03:00 committed by GitHub
parent e21ccea3a1
commit bbf897d05a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;