Skip to content

Commit 590e2b0

Browse files
🤖 dprint fmt
1 parent 8538a4c commit 590e2b0

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

types/ltijs/lib/Provider/Provider.d.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export type GetPlatformFunction = (
9393
url: string,
9494
clientId?: string,
9595
ENCRYPTIONKEY?: string,
96-
Database?: Database
96+
Database?: Database,
9797
) => Promise<Platform[] | Platform | false>;
9898

9999
declare class Provider {
@@ -132,9 +132,19 @@ declare class Provider {
132132

133133
whitelist(...urls: Array<string | { route: string; method: string }>): true;
134134

135-
registerPlatform(platform: PlatformConfig, getPlatform?: GetPlatformFunction, ENCRYPTIONKEY?: string, Database?: Database): Promise<Platform>;
136-
137-
getPlatform(url: string, clientId?: string, ENCRYPTIONKEY?: string, Database?: Database): Promise<Platform[] | Platform | false>;
135+
registerPlatform(
136+
platform: PlatformConfig,
137+
getPlatform?: GetPlatformFunction,
138+
ENCRYPTIONKEY?: string,
139+
Database?: Database,
140+
): Promise<Platform>;
141+
142+
getPlatform(
143+
url: string,
144+
clientId?: string,
145+
ENCRYPTIONKEY?: string,
146+
Database?: Database,
147+
): Promise<Platform[] | Platform | false>;
138148

139149
updatePlatformById(platformId: string, platformInfo: PlatformConfig): Promise<Platform>;
140150

types/ltijs/ltijs-tests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const ltiAdvanced = Provider.setup(
6363
secure: true,
6464
sameSite: "None",
6565
},
66-
serverAddon: app => { },
66+
serverAddon: app => {},
6767
},
6868
);
6969

@@ -164,7 +164,7 @@ ltiAdvanced.app.get("/any", (request: Request, response: Response) => {
164164
ltiAdvanced.getPlatform("https://platform.url").then(async (platform) => {
165165
if (!platform) return;
166166

167-
const p = (Array.isArray(platform) ? platform[0] : platform);
167+
const p = Array.isArray(platform) ? platform[0] : platform;
168168

169169
// $expectType string | boolean
170170
const name = await p.platformName();
@@ -173,7 +173,7 @@ ltiAdvanced.getPlatform("https://platform.url").then(async (platform) => {
173173
ltiAdvanced.getPlatform("https://platform.url", "123").then(async (platform) => {
174174
if (!platform) return;
175175

176-
const p = (Array.isArray(platform) ? platform[0] : platform);
176+
const p = Array.isArray(platform) ? platform[0] : platform;
177177

178178
// $expectType string | boolean
179179
const name = await p.platformName();

0 commit comments

Comments
 (0)