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

TS Typings for TerminalService are incorrect #1701

Closed
Async0x42 opened this issue Oct 26, 2021 · 0 comments
Closed

TS Typings for TerminalService are incorrect #1701

Async0x42 opened this issue Oct 26, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue2-portable
Milestone

Comments

@Async0x42
Copy link

I'm submitting a ... (check one with "x")

[x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110

CodeSandbox Case (Bug Reports)
Please demonstrate your case at CodeSandbox by using the issue template below. Issues without a test case have much less possibility to be reviewed in detail and assisted.

https://codesandbox.io/s/primevue-issue-template-v3-5tlbl

Current behavior
TerminalService.emit('response', response); results in the following error: Property 'emit' does not exist on type 'typeof TerminalService'.ts(2339)

TerminalService.$emit('response', response); results in the following error: Property '$emit' does not exist on type 'typeof TerminalService'.ts(2339)

The definition included is:

declare class TerminalService {
    $on(action: string, fn: any): any;
    $emit(action: string, params?: any): any;
    $off(action: string, id: number): void;
    $subscribed(action: string): boolean;
}

However in the documentation there is no $. https://primefaces.org/primevue/showcase/#/terminal

It seems it was fixed in the docs here, but the typings are different. #548

Expected behavior
There would be no error.

Please tell us about your environment:
Windows 11, VSCode 1.61.2, pnpm, TS 4.4.3

  • Vue version: 3.2.20

  • PrimeVue version: 3.8.2

@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 9, 2021
@tugcekucukoglu tugcekucukoglu added this to the 3.8.3 milestone Nov 9, 2021
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 vue2-portable
Projects
None yet
Development

No branches or pull requests

3 participants