mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [@types/dnsds] Fix return types Especially the ServiceType constructor was handled rather poorly before. This commit fixes it. Some methods (e.g. for resolving) could probably also be handled better, but that will be another PR. * Increase version number * Fix tests * Make options optional * Fix oversight introduces in previous commit
7 lines
249 B
TypeScript
7 lines
249 B
TypeScript
import * as dnssd from 'dnssd';
|
|
|
|
const serviceType = dnssd.ServiceType.tcp('_mqtt', '_mqtt._udp');
|
|
|
|
const advertisement = new dnssd.Advertisement(serviceType, 1883, { name: 'broker' });
|
|
const browser: dnssd.Browser = new dnssd.Browser(serviceType);
|