Skip to content

Conversation

@sheetalkamat
Copy link
Member

No description provided.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jun 5, 2024
/** @internal */
export function isBuilderProgram(program: Program | BuilderProgram): program is BuilderProgram {
return !!(program as BuilderProgram).getState;
export function isBuilderProgram<T extends BuilderProgram>(program: Program | BuilderProgram): program is T {
Copy link
Member

Choose a reason for hiding this comment

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

This seems unsafe; this could conform to anything, right?

Copy link
Member

Choose a reason for hiding this comment

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

I guess it's copied from somewhere else...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

Reminds me that we should see if we can make Debug.checkDefined or Debug.assert reject always-defined or never-falsy values (statically or at lint time), in case there are more of these that could be removed.

@sheetalkamat sheetalkamat merged commit b9d96df into main Jun 5, 2024
@sheetalkamat sheetalkamat deleted the builderProgramState branch June 5, 2024 23:42
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants