-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 lots of type errors and introduces assertElement. #4885
Conversation
@erwinmombay I apologize for the overlap with your recent change! |
new AssertionFunctionSpec("module$src$log.user.assert", JSType.TRUTHY), | ||
new AssertionFunctionSpec("module$src$log.dev.assert", JSType.TRUTHY), | ||
new AssertionFunctionSpec("Log$$module$src$log.prototype.assert", JSType.TRUTHY) | ||
new AssertionFunctionSpec("Log$$module$src$log.prototype.assert", JSType.TRUTHY), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we need to change this too to "AssertFunctionByTypeName" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah nvm, looks like that doesn't work. i was hoping AssertFunctionByTypeName
solves the inference issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is just an utility to be able to use custom types like Element
- Gets rid of many specific `Element` types. In practice these aren't helpful, but introduce a lot of casting. - Might have fixed on actualy bug in url-replacements.js 142 error(s), 6 warning(s), 93.81603250831178% typed
@@ -472,14 +472,15 @@ export class UrlReplacements { | |||
: String(metric); | |||
}); | |||
} else { | |||
return Promise.resolve(String(metric)); | |||
return /** @type {!Promise<(string|undefined)>} */ ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just be !Promise<string>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same reason. Unfortunately CC doesn't support complex type equivalencies on generics.
LG please :) |
LGTM |
* Fix lots of type errors and introduces assertElement. - Gets rid of many specific `Element` types. In practice these aren't helpful, but introduce a lot of casting. - Might have fixed on actualy bug in url-replacements.js 142 error(s), 6 warning(s), 93.81603250831178% typed
* Fix lots of type errors and introduces assertElement. - Gets rid of many specific `Element` types. In practice these aren't helpful, but introduce a lot of casting. - Might have fixed on actualy bug in url-replacements.js 142 error(s), 6 warning(s), 93.81603250831178% typed
Element
types. In practice these aren't helpful, but introduce a lot of casting.142 error(s), 6 warning(s), 93.81603250831178% typed