Skip to content

Commit

Permalink
docs: fix formatting in packages/core/types/README (#3292)
Browse files Browse the repository at this point in the history
* docs: fix formatting in packages/core/types/README

* format

Co-authored-by: Juan Picado <juanpicado19@gmail.com>
  • Loading branch information
NotWearingPants and juanpicado committed Aug 8, 2022
1 parent e21ccea commit bbf897d
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions packages/core/types/README.md
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit bbf897d

Please sign in to comment.