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

core(tsc): update for new @types/css-font-loading-module #5061

Merged
merged 1 commit into from
Apr 28, 2018
Merged

Conversation

brendankenny
Copy link
Member

DefinitelyTyped/DefinitelyTyped#25045 landed, so can pull out the TODOs adding support for the FontFace props added in the last year.

/** @typedef {Exclude<keyof FontFace, 'load'|'loaded'|'status'> | 'display'} FontFaceStringKeys */
// All the property keys of FontFace where the value is a string and are worth
// using for finding font matches (see _findSameFontFamily).
/** @typedef {'family'|'style'|'weight'|'stretch'|'unicodeRange'|'variant'|'featureSettings'|'display'} FontFaceStringKeys */
Copy link
Member Author

@brendankenny brendankenny Apr 28, 2018

Choose a reason for hiding this comment

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

was trying to get clever here to automate extraction of the string properties, but turns out there are string properties we don't care about, like status (which is 'unloaded' | 'loading' | 'loaded' | 'error') and not something we'd want to use to try to match up fonts). Easier to just go explicit like this.

@paulirish paulirish merged commit 5554c3d into master Apr 28, 2018
@paulirish paulirish deleted the tsfonts branch April 28, 2018 01:51
kdzwinel pushed a commit to kdzwinel/lighthouse that referenced this pull request Aug 16, 2018
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.

3 participants