Skip to content

Commit 6706770

Browse files
@jotadevelopersergiohgz
authored andcommitted
fix: update types for local data
1 parent 1de2a5e commit 6706770

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

core/types/src/types.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
declare module "@verdaccio/types" {
44

55
declare export type Stdout = stream$Writable | tty$WriteStream;
6-
declare export type Stdin = stream$Rxxeadable | tty$ReadStream;
7-
6+
declare export type Stdin = stream$Readable | tty$ReadStream;
7+
declare export type SyncReturn = Error | void;
88

99
declare export interface IStorage {
1010
addPackage(name: string, info: Package, callback: Callback): void;
@@ -33,10 +33,10 @@ declare module "@verdaccio/types" {
3333
}
3434

3535
declare export interface ILocalData {
36-
add(name: string): void;
37-
remove(name: string): void;
36+
add(name: string): SyncReturn;
37+
remove(name: string): SyncReturn;
3838
get(): StorageList;
39-
sync(): void;
39+
sync(): ?SyncReturn;
4040
}
4141

4242
declare export interface ILocalStorage {
@@ -113,26 +113,26 @@ declare module "@verdaccio/types" {
113113
homemage: string;
114114
license: string;
115115
readme: string;
116-
readmeFileName: string;
117-
description: string;
118-
bin: string;
116+
readmeFileName: string;
117+
description: string;
118+
bin: string;
119119
bugs: any;
120-
repository: string;
121-
homepage: string;
120+
repository: string;
121+
homepage: string;
122122
dist: Dist;
123-
contributors: Array<string>;
123+
contributors: Array<string>;
124124
keywords: string | Array<string>;
125125
_npmUser: Author;
126126
_hasShrinkwrap: boolean;
127127
};
128128

129129
declare export type Logger = {
130130
child: (conf: any) => any;
131-
debug: (conf: any, template?: string) => void;
132-
error: (conf: any, template?: string) => void;
133-
http: (conf: any, template?: string) => void;
134-
trace: (conf: any, template?: string) => void;
135-
info: (conf: any, template?: string) => void;
131+
debug: (conf: any, template?: mixed) => void;
132+
error: (conf: any, template?: mixed) => void;
133+
http: (conf: any, template?: mixed) => void;
134+
trace: (conf: any, template?: mixed) => void;
135+
info: (conf: any, template?: mixed) => void;
136136
}
137137

138138
declare export type Versions = {

0 commit comments

Comments
 (0)