[@types/dnssd] More fixes according the original source (#27877)

* Another set of fixes

* Fix lint

* Fix support for object type
This commit is contained in:
Max Rumpf
2018-08-06 12:02:58 -07:00
committed by Sheetal Nandi
parent 563ac4735f
commit a04576e800
+15 -14
View File
@@ -3,13 +3,14 @@
// Definitions by: Angel Merino <https://github.com/angelmerino>
// Max Rumpf <https://github.com/Maxr1998>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
import { EventEmitter } from 'events';
/** Declaration file generated by dts-gen */
export class Advertisement {
export class Advertisement extends EventEmitter {
constructor(type: string | string[] | ServiceType, port: number, ...args: any[]);
start(): Advertisement;
@@ -43,7 +44,7 @@ export class Service {
}
export class ServiceType {
constructor(...args: string[])
constructor(...args: Array<string | string[]>)
constructor(args: ServiceType);
name: string;
@@ -60,29 +61,29 @@ export class ServiceType {
}
export class Browser extends EventEmitter {
constructor(type: any, ...args: any[]);
constructor(type: string | string[] | ServiceType, ...args: any[]);
list(): any;
start(): Browser;
start(): any;
stop(): void;
stop(): any;
list(): any[];
}
export const resolveA: any;
export function resolve(name: string, type: string, args: object): Promise<any>;
export const resolveAAAA: any;
export function resolve4(name: string, type: string, args: object): Promise<string>;
export function all(): ServiceType;
export function resolve6(name: string, type: string, args: object): Promise<string>;
export function resolve(name: any, type: any, ...args: any[]): any;
export function resolveSRV(name: string, args: object): Promise<any>;
export function resolveSRV(name: any, opts: any): any;
export function resolveTXT(name: string, args: object): Promise<any>;
export function resolveService(name: any, ...args: any[]): any;
export function resolveTXT(name: any, opts: any): any;
export function resolveService(name: string, args: object): Promise<any>;
export function tcp(...args: string[]): ServiceType;
export function udp(...args: string[]): ServiceType;
export function all(): ServiceType;