Skip to content
New issue

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

Support for TypeScript Type definitions #188

Open
amitkumarhq opened this issue Aug 4, 2022 · 1 comment
Open

Support for TypeScript Type definitions #188

amitkumarhq opened this issue Aug 4, 2022 · 1 comment

Comments

@amitkumarhq
Copy link

Can you please add type definition for this package..?
It would be really helpful for TypeScript developers

@alexandermckay
Copy link

declare module 'perspective-api-client' {
  interface AnalyzeResult {
    attributeScores: any
    languages: string[]
    detectedLanguages: string[]
  }

  interface PerspectiveOptions {
    apiKey: string
  }

  export default class Perspective {
    constructor(options: PerspectiveOptions)
    analyze(text: string): Promise<AnalyzeResult>
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants