fconsole icon indicating copy to clipboard operation
fconsole copied to clipboard

Error on compile TS

Open didix16 opened this issue 5 years ago • 0 comments

Hi. I'm trying to compile an example to debug my PIXI app but when is compiling it triggers the following errors;

  Property '_backgroundColorRgb' is missing in type 'WebGLRenderer' but required in type 'SystemRenderer'.

38 EngineAdapter.instance = new PixiAdapter({renderer: renderer, nativeStage: app.stage });
                                             ~~~~~~~~

  node_modules/fgraphics/dist/adapter/pixi/typings/PIXI.d.ts:398:19
    398         protected _backgroundColorRgb: number[];
                          ~~~~~~~~~~~~~~~~~~~
    '_backgroundColorRgb' is declared here.
  node_modules/fgraphics/dist/adapter/pixi/IPixiAdapterInitData.d.ts:3:5
    3     renderer?: PIXI.SystemRenderer;
          ~~~~~~~~
    The expected type comes from property 'renderer' which is declared here on type 'IPixiAdapterInitData'

src/debug.ts:38:63 - error TS2740: Type 'Container' is missing the following properties from type 'Container': generateTexture, _originalRenderWebGL, _originalRenderCanvas, _originalUpdateTransform, and 8 more.

38 EngineAdapter.instance = new PixiAdapter({renderer: renderer, nativeStage: app.stage });
                                                                 ~~~~~~~~~~~

  node_modules/fgraphics/dist/adapter/pixi/IPixiAdapterInitData.d.ts:7:5
    7     nativeStage?: PIXI.Container;
          ~~~~~~~~~~~
    The expected type comes from property 'nativeStage' which is declared here on type 'IPixiAdapterInitData'

src/debug.ts:40:14 - error TS2345: Argument of type 'IDisplayObjectContainerWrapper' is not assignable to parameter of type 'Container'.
  Type 'IDisplayObjectContainerWrapper' is missing the following properties from type 'Container': getChildByName, children, onChildrenChange, swapChildren, and 72 more.

40 FC.startInit(EngineAdapter.instance.createDisplayObjectContainerWrapper(app.stage));
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 3 errors.

Any clue that what is going on?

Thanks a lot

didix16 avatar Jun 15 '20 17:06 didix16