Skip to content

Commit

Permalink
feat: add srcset option parameter to buildSrcSet() method signature (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sherwinski authored Mar 4, 2020
1 parent 073d63d commit 1e5507a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions src/imgix-core-js.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@ declare class ImgixClient {

constructor(opts: {domain: string; secureURLToken?: string; useHTTPS?: boolean; includeLibraryParam?: boolean;});


buildURL(path: string, params?: {}): string;
_sanitizePath(path: string): string;
_buildParams(params: {}): string;
_signParams(path: string, queryParams?: {}): string;
buildSrcSet(path: string, params?: {}): string;
_buildSrcSetPairs(path: string, params?: {}): string;
_buildDPRSrcSet(path: string, params?: {}): string;
buildSrcSet(path: string, params?: {}, options?: SrcSetOptions): string;
_buildSrcSetPairs(path: string, params?: {}, options?: SrcSetOptions): string;
_buildDPRSrcSet(path: string, params?: {}, options?: SrcSetOptions): string;

}

interface SrcSetOptions {
widths?: number[];
widthTolerance?: number;
minWidth?: number;
maxWidth?: number;
disableVariableQuality?: boolean;
}

export = ImgixClient;
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "umd",
"types": [
"node"
]
]
},
"files": [
"src/imgix-core-js.d.ts"
Expand Down

0 comments on commit 1e5507a

Please sign in to comment.