Skip to content

Commit 3790a75

Browse files
author
Nikos Vasileiou
authored
Merge pull request #206 from transifex/update-api-ts-declaration
Update @transifex/api TS declaration file
2 parents a2e9051 + cf6fbbd commit 3790a75

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/api/src/transifexApi.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface StringDict {
77
}
88

99
declare class JsonApiResource {
10-
constructor({
10+
constructor(params: {
1111
id: string,
1212
attributes: AnyDict,
1313
relationships: AnyDict,
@@ -19,7 +19,7 @@ declare class JsonApiResource {
1919
static get(arg:string | AnyDict): Promise<JsonApiResource>;
2020
fetch(relationshipName: string, force: boolean): Promise<JsonApiResource | Collection>;
2121
save(arg: AnyDict | string[]): Promise<void>;
22-
static create({
22+
static create(params: {
2323
id: string,
2424
attributes: AnyDict,
2525
relationships: AnyDict,
@@ -59,8 +59,8 @@ type AuthFunction = () => string;
5959
type AuthArgument = string | AuthFunction;
6060

6161
export declare class TransifexApi {
62-
constructor({ host: string, auth: AuthArgument });
63-
setup({ host: string, auth: AuthArgument }): void;
62+
constructor(params: { host?: string, auth: AuthArgument });
63+
setup(params: { host?: string, auth: AuthArgument }): void;
6464

6565
Organization: typeof JsonApiResource;
6666
User: typeof JsonApiResource;

0 commit comments

Comments
 (0)