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

14.2.0 TS2380 in overlay.d.ts #12159

Closed
hkjeffchan opened this issue Nov 9, 2022 · 8 comments
Closed

14.2.0 TS2380 in overlay.d.ts #12159

hkjeffchan opened this issue Nov 9, 2022 · 8 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@hkjeffchan
Copy link
Contributor

Describe the bug

Error: node_modules/primeng/overlay/overlay.d.ts:17:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
Type 'undefined' is not assignable to type 'string'.

17 get mode(): OverlayModeType | string;
~~~~

Error: node_modules/primeng/overlay/overlay.d.ts:21:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
Type 'undefined' is not assignable to type 'string'.

21 get styleClass(): string | undefined;
~~~~~~~~~~

Error: node_modules/primeng/overlay/overlay.d.ts:25:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
Type 'undefined' is not assignable to type 'string'.

25 get contentStyleClass(): string | undefined;
~~~~~~~~~~~~~~~~~

Error: node_modules/primeng/overlay/overlay.d.ts:31:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
Type 'undefined' is not assignable to type 'boolean'.

31 get autoZIndex(): boolean | undefined;
~~~~~~~~~~

Error: node_modules/primeng/overlay/overlay.d.ts:33:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
Type 'undefined' is not assignable to type 'number'.

33 get baseZIndex(): number | undefined;
~~~~~~~~~~

Error: node_modules/primeng/overlay/overlay.d.ts:41:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
Type 'undefined' is not assignable to type 'ResponsiveOverlayOptions'.

41 get responsive(): ResponsiveOverlayOptions | undefined;
~~~~~~~~~~

Error: node_modules/primeng/overlay/overlay.d.ts:43:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
Type 'undefined' is not assignable to type 'OverlayOptions'.

43 get options(): OverlayOptions | undefined;
~~~~~~~

Environment

Mac

Reproducer

No response

Angular version

14.2.9

PrimeNG version

14.2.0

Build / Runtime

TypeScript

Language

ES6

Node version (for AoT issues node --version)

v18.11.0

Browser(s)

No response

Steps to reproduce the behavior

Upgrade to 14.2.0 and build

14.1.2 is fine

Expected behavior

no error

@hkjeffchan hkjeffchan added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 9, 2022
@hkjeffchan
Copy link
Contributor Author

Angular CLI: 14.2.9
Node: 18.11.0 (Unsupported)
Package Manager: npm 8.19.2
OS: darwin x64

Angular: 14.2.9
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.1402.9
@angular-devkit/build-angular 14.2.9
@angular-devkit/core 14.2.9
@angular-devkit/schematics 14.2.9
@angular/cdk 14.2.6
@schematics/angular 14.2.9
rxjs 7.5.7
typescript 4.8.4

@hkjeffchan
Copy link
Contributor Author

tsconfig.json:

/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2020",
"module": "es2020",
"lib": [
"es2020",
"dom"
],
"typeRoots": [
"node_modules/@types"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true,
"fullTemplateTypeCheck": true,
"extendedDiagnostics": {
"checks": {
"invalidBananaInBox": "error",
"nullishCoalescingNotNullable": "warning"
},
"defaultCategory": "suppress"
},
"strictPropertyInitialization": false
},
"exclude": [
"node_modules"
]
}

@brunork26
Copy link

To fix this for the moment you can go into:
/primeng/overlay/overlay.d.ts
and "fix" the setters:
from: set mode(value: string);
to: set mode(value: OverlayModeType | string);

@mertsincan mertsincan added this to the 14.2.1 milestone Nov 9, 2022
@mertsincan mertsincan self-assigned this Nov 9, 2022
@mertsincan
Copy link
Member

Hi @hkjeffchan and @brunork26,

Thanks a lot for your report! Could you please check and test my fix?

@nestor91sanchez
Copy link

Hi guys, I have the same error, @mertsincan Could you please confirm me the version to fix that?

mertsincan added a commit that referenced this issue Nov 9, 2022
@mertsincan
Copy link
Member

@nestor91sanchez I'll release 14.2.1 version asap.

@mertsincan
Copy link
Member

v14.2.1 Released ;)

@rashid-naico
Copy link

@mertsincan Thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

5 participants