Closed phamnhuvu-dev closed 3 years ago
Hey @phamnhuvu-dev, not sure completely what you mean Do you want to write your own plugin in typescript to be used with appium ?
Do you want to write your own plugin in typescript to be used with appium ?
Yes
Do you want to write your own plugin in typescript to be used with appium ?
Yes
Yes you can write your own plugin in typescript and let the compiler take care of generating the build files. Just need to ensure that you export your plugin class. See https://github.com/appium/appium-plugins/blob/c48838b3ad14b2f7fc683e2dc748c4159927f374/packages/base/package.json#L21 as an example of exporting the main class
Basically you have to compile your plugin before installing or using it
@Dharin-shah Tks, I got it.
@phamnhuvu-dev it's definitely possible to write a typescript plugin. I am writing one myself. I also have a PR that will export typescript types for BasePlugin: https://github.com/appium/appium-plugins/pull/20/files
Sorry, I am not a master JS side.
I have a private typescript package. I want to use it in the plugin What I knew that it can't import typescript class into javascript class directly and hard. So can we create a typescript plugin?