-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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 scoping of chromecast-caf-receiver to be a global const (since the cast sdk is loaded from a script tag) #28446
Fix scoping of chromecast-caf-receiver to be a global const (since the cast sdk is loaded from a script tag) #28446
Conversation
import messages from './cast.framework.messages'; | ||
import ui from './cast.framework.ui'; | ||
|
||
interface CastReceiverFrameworkSDK { |
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 was an annoying manual process but without it tsc would not detect the imported interfaces... i.e.
interface CastReceiverFrameworkSDK {
framework: framework;
}
did not work.
@enjikaka Thank you for submitting this PR! 🔔 @craigrbruce - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
@enjikaka The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
@enjikaka The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
@enjikaka I haven't seen anything from you in a while and this PR currently has problems that prevent it from being merged. The PR will be closed tomorrow if there aren't new commits to fix the issues. |
@enjikaka To keep things tidy, we have to close PRs that aren't mergeable but don't have activity from their author. No worries, though - please open a new PR if you'd like to continue with this change. Thank you! |
npm test
.)npm run lint package-name
(ortsc
if notslint.json
is present).Select one of these and delete the others:
If changing an existing definition:
tslint.json
containing{ "extends": "dtslint/dt.json" }
.Common mistakes
When I changed QueueBase to be a newable interface instead of being a class tsc correctly lints my JS, but when it's a class it complains that
Type 'QueueBase' is not a constructor function type.
... Not sure what to do about that!?This does some refactoring in the chromecast-caf-receiver folder to make sure it's correctly scoped so that the global cast object (which is imported by a script tag) gets the types from chromecast-caf-receiver.