Bad description for Ionic Native ActionSheet


#1

Hello! I did not know where to write, so I’m writing here.

On the site with the documentation for the framework, namely the link: https://ionicframework.com/docs/native/action-sheet/ in the usage section, an example of using this plugin is given. But! Interface ActionSheetOptions has one “mandatory” field (not optional) - buttonLabels. Perhaps this feature is observed only in me, but: when enumerating the parameters of ActionSheetOptions, if the first parameter does not specify buttonLabels, then my PHPStorm swears :slight_smile:


#2

Does it only red squiggly it or does it actually break when you run it?
Can you show a screenshot of what you get?


#3

import { ActionSheet, ActionSheetOptions } from '@ionic-native/action-sheet';

Application work correctly in both cases


#4

Do you have something like let buttonLabels = ['Share via Facebook', 'Share via Twitter']; as well?
What does it show when you hover over the red squiggly thing? Normally it shows what it doesn’t like…


#5

You can see example here https://github.com/ionic-team/ionic-preview-app/blob/master/src/pages/action-sheets/basic/pages.ts

this is working fine.


#6


#7

It’s about the native plug-in “Action Sheet”. Despite these red waves, everything works. I just announced that there is such a situation …

I think the implementation of the plugin is simpler and more compact, rather than the example of the link mentioned above)) Why “reinvent the wheel”, if it has already been manufactured …


#8

Interesting why it thinks that this doesn’t match to the definition: https://github.com/ionic-team/ionic-native/blob/master/src/@ionic-native/plugins/action-sheet/index.ts#L4


#9

That’s why I wrote - like the type of parameters is the same, but PHPStorm swears )

In general - it does not bother me, but I would like everything to be perfect


#10

Could you create an issue at https://github.com/ionic-team/ionic-native/issues and include your description and screenshot? Also emphazise that everthing is working just fine, but only the red stuff is strange.


#11

Ok, it will take some time