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

Not compatible with strict settings on TS4.3.5 #5

Open
uclanintegrator opened this issue Oct 1, 2021 · 1 comment
Open

Not compatible with strict settings on TS4.3.5 #5

uclanintegrator opened this issue Oct 1, 2021 · 1 comment

Comments

@uclanintegrator
Copy link

uclanintegrator commented Oct 1, 2021

Hi

Trying to compile using TSC gives me the errors below.
"contensis-core-api": "1.0.3",
"contensis-delivery-api": "1.1.7",
"contensis-management-api": "2.0.2",:

node_modules/contensis-core-api/src/models/ContensisQueryOrderBy.ts:3:7 - error TS7006: Parameter 'fieldName' implicitly has an 'any' type.

3  desc(fieldName): ContensisQueryOrderBy;
        ~~~~~~~~~

node_modules/contensis-core-api/src/models/ILogicalExpression.ts:4:2 - error TS7010: 'setItem', which lacks return-type annotation, implicitly has an 'any' return type.

4  setItem(index: number, item: IExpression);
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/contensis-core-api/src/models/ILogicalExpression.ts:6:2 - error TS7010: 'addRange', which lacks return-type annotation, implicitly has an 'any' return type.

6  addRange(items: IExpression[]);
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/contensis-core-api/src/models/query.ts:80:15 - error TS2345: Argument of type 'null' is not assignable to parameter of type 'string'.

80         super(null, values, operatorName, ExpressionValueTypeEnum.Array);
                 ~~~~

node_modules/contensis-core-api/src/models/query.ts:348:9 - error TS2322: Type 'null' is not assignable to type 'ContensisQueryOrderByDto'.

348         return null;
            ~~~~~~~~~~~~

node_modules/contensis-core-api/src/models/query.ts:370:5 - error TS2322: Type 'ContensisQueryOrderByDto[] | null' is not assignable to type 'ContensisQueryOrderByDto[]'.
  Type 'null' is not assignable to type 'ContensisQueryOrderByDto[]'.

370     return ((orderBy as Ordering).toArray) ? (orderBy as Ordering).toArray() : null;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 6 errors.

--- This is my tsconfig.json:

{
  "compilerOptions": {
    "rootDir": "./src",
    "outDir": "./dist",
    "module": "commonjs",
    "target": "es2019",
    "declaration": false,
    "sourceMap": true,
    "importHelpers": true,
    "strict": true,
    "incremental": true,
    "moduleResolution": "node",
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "skipLibCheck": false,
    "types": [],
    "lib": [
      "es2019",
      "dom"
    ]
  },
  "exclude": [
    "node_modules",
    "./dist/*",
    "./data/*",
    "./logs/*",
    "./**/*.spec.ts"

  ]
}

@alexpop-zengenti
Copy link
Member

Hi,
We are currently using TypeScript 3.3 for these packages but we plan to upgrade them to TypeScript 4.x soon.
We will let you know when we are starting the upgrade.
Kind Regards,
Alex Pop

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

2 participants