Skip to content

Commit

Permalink
Add external type
Browse files Browse the repository at this point in the history
  • Loading branch information
clintandrewhall committed Mar 10, 2022
1 parent 956a651 commit 8c1b0bd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
31 changes: 31 additions & 0 deletions packages/kbn-sharedux-storybook/src/file_system_cache.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

// Storybook uses this module and its types are defined in the source but not in the type output
declare module 'file-system-cache' {
interface Options {
basePath?: string;
ns?: string | string[];
extension?: string;
}

class FileSystemCache {
constructor(options: Options);
path(key: string): string;
fileExists(key: string): Promise<boolean>;
ensureBasePath(): Promise<void>;
get(key: string, defaultValue?: any): Promise<any | typeof defaultValue>;
getSync(key: string, defaultValue?: any): any | typeof defaultValue;
set(key: string, value: any): Promise<{ path: string }>;
setSync(key: string, value: any): this;
remove(key: string): Promise<void>;
clear(): Promise<void>;
save(): Promise<{ paths: string[] }>;
load(): Promise<{ files: Array<{ path: string; value: any }> }>;
}
}
1 change: 0 additions & 1 deletion src/plugins/shared_ux/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"common/**/*",
"public/**/*",
"server/**/*",
".storybook/**/*",
"../../../typings/**/*"
],
"references": [
Expand Down

0 comments on commit 8c1b0bd

Please sign in to comment.