summaryrefslogtreecommitdiff
path: root/packages/misskey-js/test-d/streaming.ts
blob: b46b06e4dfb78826c4035ea5b91ace273f071238 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import { expectType } from 'tsd';
import * as Misskey from '../src/index.js';

describe('Streaming', () => {
	test('emit type', async () => {
		const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' });
		const mainChannel = stream.useChannel('main');
		mainChannel.on('notification', notification => {
			expectType<Misskey.entities.Notification>(notification);
		});
	});
});