capacitor-community/text-to-speech

bug: types are not detected by editor

robingenz opened this issue · 1 comments

Describe the bug
grafik

To Reproduce

import { Injectable } from '@angular/core';
import '@capacitor-community/text-to-speech';
import { Plugins } from '@capacitor/core';

@Injectable({
  providedIn: 'root',
})
export class TextToSpeechService {
  constructor() {}

  public async speak(): Promise<void> {
    await Plugins.TextToSpeech.
  }
}

Expected behavior
grafik

Additional context
Editor: VS Code 1.54.1

Duplicate of ionic-team/capacitor#1547 and ionic-team/capacitor#2593

Have two "custom plugins" in my project. One is always missing the type declarations.
If I import only @capacitor-community/text-to-speech there are no problems.
Should be fixed with Capacitor v3.
Workaround: Cast plugin to an interface.