Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

[bug]: Cannot build with strict mode #47

Open
panudetjt opened this issue Sep 28, 2020 · 0 comments
Open

[bug]: Cannot build with strict mode #47

panudetjt opened this issue Sep 28, 2020 · 0 comments

Comments

@panudetjt
Copy link

panudetjt commented Sep 28, 2020

Bug Report

It's cannot build with "strict": true in tsconfig.json

Ionic version:

[x] 4.x

Current behavior:

Throw chaos errors

Expected behavior:

Peaceful build pass

Steps to reproduce:

git clone [email protected]:SimonGolms/ngx-ionic-image-viewer.git
cd ngx-ionic-image-viewer/demo
// Edit tsconfig.json below
npm install
npm run build -- --prod

Related code:

// tsconfig.json
{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "strict": true,   // I'm here 0/
    "declaration": false,
    "module": "esnext",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "es2015",
    "typeRoots": ["node_modules/@types"],
    "lib": ["es2018", "dom"],
    "paths": {
      "@angular/*": ["../node_modules/@angular/*"]
    }
  },
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true
  }
}

Other information:

build log

> [email protected] build /Users/usera/Desktop/projects/ngx-ionic-image-viewer/demo
> ng build "--prod"


ERROR in node_modules/ngx-ionic-image-viewer/ngx-ionic-image-viewer.d.ts.NgxIonicImageViewerComponent.html(5,3): Type 'string | undefined' is not assignable to type 'string'.
  Type 'undefined' is not assignable to type 'string'.
node_modules/ngx-ionic-image-viewer/ngx-ionic-image-viewer.d.ts.ViewerModalComponent.html(1,13): Object is possibly 'undefined'.
node_modules/ngx-ionic-image-viewer/ngx-ionic-image-viewer.d.ts.ViewerModalComponent.html(22,13): Object is possibly 'undefined'.```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant