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:
Angel Merino
2018-04-17 18:46:34 +02:00
committed by Ryan Cavanaugh
parent e498086912
commit df22c6534a

View File

@@ -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;