nstudio / nativescript-checkbox

NativeScript plugin for checkbox UI component
Other
119 stars 56 forks source link

Sources not building on tns 6.1.2 #119

Closed Nevaan closed 4 years ago

Nevaan commented 5 years ago

Hi,

I wanted to build the sources locally, and followed the instructions from README: cloned repo, and then run

cd src && npm run setup

I am getting this output:

checkbox.ios.ts:61:48 - error TS2304: Cannot find name 'BEMBoxType'.

61 const boxTypeProperty = new Property<CheckBox, BEMBoxType>({
                                                  ~~~~~~~~~~

checkbox.ios.ts:65:9 - error TS2304: Cannot find name 'BEMBoxType'.

65       ? BEMBoxType.Circle
           ~~~~~~~~~~

checkbox.ios.ts:66:9 - error TS2304: Cannot find name 'BEMBoxType'.

66       : BEMBoxType.Square;
           ~~~~~~~~~~

checkbox.ios.ts:79:25 - error TS2304: Cannot find name 'BEMCheckBox'.

79   private _iosCheckbox: BEMCheckBox;
                           ~~~~~~~~~~~

checkbox.ios.ts:93:25 - error TS2304: Cannot find name 'BEMCheckBox'.

93     this._iosCheckbox = BEMCheckBox.alloc().initWithFrame(
                           ~~~~~~~~~~~

checkbox.ios.ts:95:10 - error TS2304: Cannot find name 'BEMCheckBox'.

95     ) as BEMCheckBox;
            ~~~~~~~~~~~

checkbox.ios.ts:238:41 - error TS2304: Cannot find name 'BEMBoxType'.

238     this.boxType = this.boxType === 0 ? BEMBoxType.Circle : BEMBoxType.Square;
                                            ~~~~~~~~~~

checkbox.ios.ts:238:61 - error TS2304: Cannot find name 'BEMBoxType'.

238     this.boxType = this.boxType === 0 ? BEMBoxType.Circle : BEMBoxType.Square;
                                                                ~~~~~~~~~~

checkbox.ios.ts:263:16 - error TS2304: Cannot find name 'BEMAnimationType'.

263         return BEMAnimationType.Stroke;
                   ~~~~~~~~~~~~~~~~

checkbox.ios.ts:265:16 - error TS2304: Cannot find name 'BEMAnimationType'.

265         return BEMAnimationType.Fill;
                   ~~~~~~~~~~~~~~~~

checkbox.ios.ts:267:16 - error TS2304: Cannot find name 'BEMAnimationType'.

267         return BEMAnimationType.Bounce;
                   ~~~~~~~~~~~~~~~~

checkbox.ios.ts:269:16 - error TS2304: Cannot find name 'BEMAnimationType'.

269         return BEMAnimationType.Flat;
                   ~~~~~~~~~~~~~~~~

checkbox.ios.ts:271:16 - error TS2304: Cannot find name 'BEMAnimationType'.

271         return BEMAnimationType.Stroke;
                   ~~~~~~~~~~~~~~~~

checkbox.ios.ts:273:16 - error TS2304: Cannot find name 'BEMAnimationType'.

273         return BEMAnimationType.Fade;
                   ~~~~~~~~~~~~~~~~

checkbox.ios.ts:275:16 - error TS2304: Cannot find name 'BEMAnimationType'.

275         return BEMAnimationType.Stroke;
                   ~~~~~~~~~~~~~~~~

checkbox.ios.ts:287:59 - error TS2304: Cannot find name 'BEMCheckBoxDelegate'.

287 class BEMCheckBoxDelegateImpl extends NSObject implements BEMCheckBoxDelegate {
                                                              ~~~~~~~~~~~~~~~~~~~

checkbox.ios.ts:288:34 - error TS2304: Cannot find name 'BEMCheckBoxDelegate'.

288   public static ObjCProtocols = [BEMCheckBoxDelegate];
                                     ~~~~~~~~~~~~~~~~~~~

checkbox.ios.ts:303:48 - error TS2304: Cannot find name 'BEMCheckBox'.

303   public animationDidStopForCheckBox(checkBox: BEMCheckBox): void {
                                                   ~~~~~~~~~~~

checkbox.ios.ts:307:35 - error TS2304: Cannot find name 'BEMCheckBox'.

307   public didTapCheckBox(checkBox: BEMCheckBox): void {

And build fails.

I am using nativescript 6.1.2, running on macOS.

madmas commented 4 years ago

It looks like the typing referenced in /src/references.d.ts for BEMCheckbox is missing. @bradmartin can you add it to the repo?

madmas commented 4 years ago

Update: as I also needed the typings to run the demo, I generated them and added a PR :)