mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Update types for dnssd (#25054)
* Added types for dnssd * Cosmetics, test passed * Removed unused rules * Service entry type added Browser implements EventEmitter * make tslint happy
This commit is contained in:
committed by
Ryan Cavanaugh
parent
e498086912
commit
df22c6534a
23
types/dnssd/index.d.ts
vendored
23
types/dnssd/index.d.ts
vendored
@@ -4,6 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
/** Declaration file generated by dts-gen */
|
||||
|
||||
@@ -17,7 +18,27 @@ export class Advertisement {
|
||||
updateTXT(txtObj: any): void;
|
||||
}
|
||||
|
||||
export class Browser {
|
||||
/**
|
||||
* A service entry as returned by serviceUp
|
||||
*/
|
||||
export class Service {
|
||||
fullname: string; // 'InstanceName._googlecast._tcp.local.'
|
||||
name: string; // 'InstanceName'
|
||||
type: SType; // { name: 'googlecast'; protocol: 'tcp' }
|
||||
domain: string; // 'local'
|
||||
host: string; // 'Hostname.local.'
|
||||
port: number; // 8009
|
||||
addresses: string[]; // ['192.168.1.15']
|
||||
txt: any; // { id: 'strings' }
|
||||
txtRaw: any;
|
||||
}
|
||||
|
||||
export class SType {
|
||||
name: string;
|
||||
protocol: string;
|
||||
}
|
||||
|
||||
export class Browser extends EventEmitter {
|
||||
constructor(type: any, ...args: any[]);
|
||||
|
||||
list(): any;
|
||||
|
||||
Reference in New Issue
Block a user