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

Discrepancy in TypeScript types #273

Closed
tearwyx opened this issue Nov 20, 2021 · 5 comments
Closed

Discrepancy in TypeScript types #273

tearwyx opened this issue Nov 20, 2021 · 5 comments

Comments

@tearwyx
Copy link
Contributor

tearwyx commented Nov 20, 2021

According to the module pino-abstract-transport the function exported by default returns a value of type Transform from the module stream, but in the declaration file it returns type (inputData: string | object) => string.

Based on version 7.2.0.

@mcollina
Copy link
Member

Thanks for reporting!
Would you like to send a Pull Request to address this issue? Remember to add unit tests.

tearwyx added a commit to tearwyx/pino-pretty that referenced this issue Nov 21, 2021
tearwyx added a commit to tearwyx/pino-pretty that referenced this issue Nov 21, 2021
tearwyx added a commit to tearwyx/pino-pretty that referenced this issue Nov 21, 2021
tearwyx added a commit to tearwyx/pino-pretty that referenced this issue Nov 21, 2021
tearwyx added a commit to tearwyx/pino-pretty that referenced this issue Nov 21, 2021
@tearwyx
Copy link
Contributor Author

tearwyx commented Nov 21, 2021

@mcollina #274

@ugnmura
Copy link

ugnmura commented Nov 28, 2021

Having the same issue with the type Prettifier

declare namespace PinoPretty {
  type Prettifier = (inputData: string | object) => string;
  type MessageFormatFunc = (log: LogDescriptor, messageKey: string, levelLabel: string) => string;
  type PrettyOptions = PrettyOptions_
}

@kibertoad
Copy link
Contributor

@SushiWaUmai Can you send a PR with tests?

@tearwyx
Copy link
Contributor Author

tearwyx commented Nov 28, 2021

If it is the same issue, there is no need to fix it once it has been fixed in the main branch (#274) and hopefully it will get out someday.

@tearwyx tearwyx closed this as completed Nov 30, 2021
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

4 participants