From 209c1d7798c964d865ef8ae9cc86375c3fd6fd61 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravosudko Date: Tue, 6 Apr 2021 18:45:26 +0300 Subject: [PATCH] add type assertion test for client.create* method param --- test/type/client.test-d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/type/client.test-d.ts b/test/type/client.test-d.ts index bc1e06093..fb6378708 100644 --- a/test/type/client.test-d.ts +++ b/test/type/client.test-d.ts @@ -2,7 +2,8 @@ import { expectError, expectType } from 'tsd'; import { Response } from 'node-fetch'; import { Client } from '../../src/types/client'; import { Collection } from '../../src/types/collection'; -import { Application } from '../../src/types/models/Application'; +import { Application, ApplicationOptions } from '../../src/types/models/Application'; +import { InlineHook } from '../../src/types/models/InlineHook'; const client = new Client(); @@ -16,3 +17,9 @@ expectError(client.deleteApplicationUser('appId', 'userId', {sendEmail: 0})); // Client methods return either Promise or Collection expectType>(client.deletePolicy('policyId')); expectType>(client.listApplications()); + +// methods expecting body request parameters +const appOptions: ApplicationOptions = { + name: 'oidc_app', +}; +expectType>(client.createApplication(appOptions)):