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

How to build locally? #27

Closed
svzi opened this issue Aug 6, 2017 · 7 comments
Closed

How to build locally? #27

svzi opened this issue Aug 6, 2017 · 7 comments

Comments

@svzi
Copy link
Contributor

svzi commented Aug 6, 2017

I want to make some improvements on the Android part for this plugin. Sadly I don't get it to compile on my local machine. I forked this repository and checked it out. When I run npm run setup, tsc is reporting some issues::

error TS2318: Cannot find global type 'Array'.

error TS2318: Cannot find global type 'Boolean'.

error TS2318: Cannot find global type 'Function'.

error TS2318: Cannot find global type 'IArguments'.

error TS2318: Cannot find global type 'Number'.

error TS2318: Cannot find global type 'Object'.

error TS2318: Cannot find global type 'RegExp'.

error TS2318: Cannot find global type 'String'.


3   public action: Function;
                   ~~~~~~~~

common.ts(3,18): error TS4031: Public property 'action' of exported class has or is using private name 'Function'.


170   public static showCustomButtons(buttons: Array<TNSFancyAlertButton>, image: any, color: string, title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number) {
                                               ~~~~~

fancyalert.ios.ts(170,44): error TS4070: Parameter 'buttons' of public static method from exported class has or is using private name 'Array'.


180   public static showCustomTextAttributes(attributionBlock: Function, button: TNSFancyAlertButton, image: any, color: string, title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number) {
                                                               ~~~~~~~~

fancyalert.ios.ts(180,60): error TS4070: Parameter 'attributionBlock' of public static method from exported class has or is using private name 'Function'.

Any help would be really much appreciated.

I use TypeScript version 2.4.2 together with NPM 5.3.0 on Mac OS X. What else do you need to know?

Best,
Sven

@EduhCosta
Copy link

I have the same problem!! ˆˆ

@svzi
Copy link
Contributor Author

svzi commented Aug 21, 2017

Could you please help us @NathanWalker ?

@bradmartin
Copy link
Collaborator

#29 @svzi this should help

@svzi
Copy link
Contributor Author

svzi commented Aug 25, 2017

That looks very promising @bradmartin ! I hope that will get merged soon, because I want to submit my local modifications based on your PR.

@bradmartin
Copy link
Collaborator

Go for it @svzi 👍

@NathanWalker
Copy link
Owner

I was on vacation when you posted this. Brad saved day thank you!

@trusktr
Copy link

trusktr commented Dec 21, 2019

Regarding the all-too-common error "has or is using private name", I've opened a request to fix issues like these in TypeScript by bringing declaration files to parity with language features. microsoft/TypeScript#35822

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

5 participants