ionic-team / capacitor-docgen

Docs Readme Markdown and JSON Generator for Capacitor Plugins.
https://capacitorjs.com/
Other
12 stars 8 forks source link

feat(method): change to be able to add extends object #24

Closed rdlabo closed 2 years ago

rdlabo commented 3 years ago

Added support for extends from other file. For example:

import type { BannerDefinitions } from './banner';
import type { InterstitialDefinitions } from './interstitial';
import type { RewardDefinitions } from './reward';

type AdMobDefinitions = BannerDefinitions &
  RewardDefinitions &
  InterstitialDefinitions;

export interface AdMobPlugin extends AdMobDefinitions {
  initialize(options: AdMobInitializationOptions): Promise<void>;
}

fix: https://github.com/ionic-team/capacitor-docgen/issues/22

jcesarmobile commented 2 years ago

Sorry, I've reverted this change because it was causing some problems like adding duplicated addListener/removeAllListeners methods on some of the core plugins and some methods from dependencies that weren't being imported in the plugin types (see https://github.com/ionic-team/capacitor-docgen/issues/36) I've been trying to fix that but I've not been able to do it, so I've reverted this change as it's what causes the issue.

I've you find a better way of doing this without causing those issues I'll merge it.