mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
fix import (#36895)
This commit is contained in:
parent
bdcb1ea65f
commit
d0f9f8130e
@ -1,4 +1,4 @@
|
||||
import { StorageBase, Image, ReadOptions } from 'ghost-storage-base';
|
||||
import StorageBase, { Image, ReadOptions } from 'ghost-storage-base';
|
||||
import { Request, Response, NextFunction } from 'express';
|
||||
|
||||
class MyCustomAdapter extends StorageBase {
|
||||
|
||||
30
types/ghost-storage-base/index.d.ts
vendored
30
types/ghost-storage-base/index.d.ts
vendored
@ -2,30 +2,34 @@
|
||||
// Project: https://github.com/TryGhost/Ghost-Storage-Base
|
||||
// Definitions by: Demian <https://github.com/thde>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
import { Handler } from 'express';
|
||||
|
||||
export interface Image {
|
||||
path: string;
|
||||
name: string;
|
||||
type: string;
|
||||
declare namespace StorageBase {
|
||||
interface Image {
|
||||
path: string;
|
||||
name: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
interface ReadOptions {
|
||||
path: string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface ReadOptions {
|
||||
path: string;
|
||||
}
|
||||
|
||||
export abstract class StorageBase {
|
||||
declare abstract class StorageBase {
|
||||
constructor();
|
||||
|
||||
abstract exists(fileName: string, targetDir?: string): Promise<boolean>;
|
||||
abstract save(image: Image, targetDir?: string): Promise<string>;
|
||||
abstract save(image: StorageBase.Image, targetDir?: string): Promise<string>;
|
||||
abstract serve(): Handler;
|
||||
abstract delete(fileName: string, targetDir?: string): Promise<boolean>;
|
||||
abstract read(options?: ReadOptions): Promise<Buffer>;
|
||||
abstract read(options?: StorageBase.ReadOptions): Promise<Buffer>;
|
||||
|
||||
getTargetDir(baseDir?: string): string;
|
||||
getUniqueFileName(image: Image, targetDir: string): string;
|
||||
getUniqueFileName(image: StorageBase.Image, targetDir: string): string;
|
||||
getSanitizedFileName(fileName: string): string;
|
||||
}
|
||||
|
||||
export = StorageBase;
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"esModuleInterop": true,
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user