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

fix(fast_check_dts): ensure top level non-exported functions have declare keyword #423

Merged

Conversation

dsherret
Copy link
Member

No description provided.

function test8(param0?: any): any;
declare function test8(param: number): number;
declare function test8(param: string): string;
declare function test8(param0?: any): any;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main fix is here
image

Copy link
Contributor

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. Why do we remove the declare keyword for exported things? Checking with tsc they add it there https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBAMwK4DsDGMCWEWIhACgEoAuOANwkwBM4BvAXwChRJY40cBneAQzgC8cACwAmFuGjw0AG15cucAGL56DIA

@dsherret
Copy link
Member Author

Huh, I wonder why typescript does that because I don't believe it's necessary for exported declarations. I'll revert to align.

@dsherret dsherret merged commit d402cbd into denoland:main Mar 28, 2024
4 checks passed
@dsherret dsherret deleted the fix_dts_ensure_top_level_func_declare branch March 28, 2024 20:19
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

Successfully merging this pull request may close these issues.

None yet

2 participants