From 3324f3fa158c8b3758ca58137dc17a7113c3a196 Mon Sep 17 00:00:00 2001 From: tamaina Date: Wed, 10 May 2023 17:34:13 +0000 Subject: [PATCH] test --- packages/misskey-js/test-d/schemas.ts | 95 +++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 packages/misskey-js/test-d/schemas.ts diff --git a/packages/misskey-js/test-d/schemas.ts b/packages/misskey-js/test-d/schemas.ts new file mode 100644 index 0000000000..0152dd20ea --- /dev/null +++ b/packages/misskey-js/test-d/schemas.ts @@ -0,0 +1,95 @@ +import { Packed, Def } from '../src/schemas'; +// import { expectType } from 'tsd'; + +describe('schemas', () => { + test('user', () => { + type UserLite = Packed<'UserLite'>; + /* Error: is declared too wide for argument type + expectType({ + id: 'string', + name: null, + username: 'string', + host: null, + avatarUrl: 'string', + avatarBlurhash: 'string', + isAdmin: false, + isModerator: false, + isBot: false, + isCat: false, + onlineStatus: null, + }); + */ + type UserDetailedNotMeOnly = Packed<'UserDetailedNotMeOnly'>; + type UserDetailedNotMe = Packed<'UserDetailedNotMe'>; + type MeDetailed = Packed<'MeDetailed'>; + type User = Packed<'User'>; + type UserDetailed = Packed<'UserDetailed'>; + }); + test('user list', () => { + type UserList = Packed<'UserList'>; + }); + test('app', () => { + type App = Packed<'App'>; + }); + test('note', () => { + type Note = Packed<'Note'>; + }); + test('note reaction', () => { + type NoteReaction = Packed<'NoteReaction'>; + }); + test('note favorite', () => { + type NoteFavorite = Packed<'NoteFavorite'>; + }); + test('notification', () => { + type Notification = Packed<'Notification'>; + }); + test('drive file', () => { + type DriveFile = Packed<'DriveFile'>; + }); + test('drive folder', () => { + type DriveFolder = Packed<'DriveFolder'>; + }); + test('following', () => { + type Following = Packed<'Following'>; + }); + test('muting', () => { + type Muting = Packed<'Muting'>; + }); + test('renote muting', () => { + type RenoteMuting = Packed<'RenoteMuting'>; + }); + test('blocking', () => { + type Blocking = Packed<'Blocking'>; + }); + test('hashtag', () => { + type Hashtag = Packed<'Hashtag'>; + }); + test('page', () => { + type Page = Packed<'Page'>; + }); + test('channel', () => { + type Channel = Packed<'Channel'>; + }); + test('queue count', () => { + type QueueCount = Packed<'QueueCount'>; + }); + test('antenna', () => { + type Antenna = Packed<'Antenna'>; + }); + test('clip', () => { + type Clip = Packed<'Clip'>; + }); + test('federation instance', () => { + type FederationInstance = Packed<'FederationInstance'>; + }); + test('gallery post', () => { + type GalleryPost = Packed<'GalleryPost'>; + }); + test('emoji', () => { + type EmojiSimple = Packed<'EmojiSimple'>; + type EmojiDetailed = Packed<'EmojiDetailed'>; + }); + test('flash', () => { + type Flash = Packed<'Flash'>; + }); +});