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

feat: add Type.isTemplateLiteral method #1288

Merged

Conversation

shaharkazaz
Copy link
Contributor

Expose a new isTemplateLiteral method from the Type class.

No breaking changes were introduced in this PR.

@@ -200,25 +200,26 @@ type.isAnonymous();
type.isAny();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ordered them alphabetically and added isTemplateLiteral to the list, that's why you see multiple changes here 🙂

Copy link
Owner

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

Also looks good. Thanks!

@@ -389,6 +389,13 @@ export class Type<TType extends ts.Type = ts.Type> {
return symbol.getName() === "Array" && this.getTypeArguments().length === 1;
}

/**
* Gets if this is a boolean type.
Copy link
Owner

Choose a reason for hiding this comment

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

template literal. I'll fix it after merge (going to do a release)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missed that 😅

@dsherret dsherret merged commit 284a7fd into dsherret:latest Jun 3, 2022
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