We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
maybe you want to add a d.ts typing file (package.json "typing": "index.d.ts")
declare module 'react-native-zeroconf' { import { EventEmitter } from 'events'; export interface PendingService { name: string; } export interface Service { name: string; port: number; txt: { [key: string]: string; }; addresses: string[]; fullName: string; host: string; } export default class Zeroconf extends EventEmitter { public getServices(): { [name: string]: Service | PendingService; }; public scan(type?: string, protocol?: string, domain?: string, implType?: 'NSD' | 'DNSSD'): void; public stop(implType?: 'NSD' | 'DNSSD'): void; public publishService(type: string, protocol: string, domain?: string, name?: Service['name'], port?: Service['port'], txt?: Service['txt'], implType?: 'NSD' | 'DNSSD'): void; public unpublishService(name: string, implType?: 'NSD' | 'DNSSD'): void; public on(event: 'start', listener: () => void): this; public on(event: 'stop', listener: () => void): this; public on(event: 'error', listener: (error: any) => void): this; public on(event: 'update', listener: () => void): this; public on(event: 'found', listener: (name: string) => void): this; public on(event: 'remove', listener: (name: string) => void): this; public on(event: 'resolved', listener: (service: Service) => void): this; public on(event: 'published', listener: (service: Service) => void): this; public on(event: 'unpublished', listener: (service: Service) => void): this; // addListener, once, etc? } }
The text was updated successfully, but these errors were encountered:
I don't deal with typings as I don't use them, usually people do PRs on the repos I maintain and I merge them, so feel free! 🙂
Sorry, something went wrong.
I realize this is old, but @types/react-native-zeroconf exists
No branches or pull requests
Hi,
maybe you want to add a d.ts typing file (package.json "typing": "index.d.ts")
The text was updated successfully, but these errors were encountered: