Skip to content
This repository has been archived by the owner on Jul 26, 2019. It is now read-only.
/ flow-types Public archive

👣🤖Typescript Types definitions for Verdaccio

License

Notifications You must be signed in to change notification settings

verdaccio/flow-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated repository

This repository has been moved to a monorepo you can find in verdaccio/monorepo. This package is located in core/types folder


Typescript types for Verdaccio

Typescript definitions for verdaccio plugins and internal code

Typescript

For usage with the library, the tsconfig.json should looks like this.

//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"
    ]
  },
  "include": [
    "src/*.ts",
    "types/*.d.ts"
  ]
}

Imports

import type {ILocalData, LocalStorage, Logger, Config} from '@verdaccio/types';

 class LocalData implements ILocalData {

  path: string;
  logger: Logger;
  data: LocalStorage;
  config: Config;
  locked: boolean;
  ...
}