Refine type hints for COM object creation and retrieval.#940
Merged
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #940 +/- ##
=======================================
Coverage 88.93% 88.94%
=======================================
Files 139 139
Lines 13642 13649 +7
=======================================
+ Hits 12133 12140 +7
Misses 1509 1509 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR focuses type-hint improvements for core COM object creation and retrieval functions.
The goal is solely to enhance static type safety and developer experience within IDEs by providing precise
@overloadsignatures andLiteralhints.Changes
1. Static Type Resolution for Object Creation
CreateObject,GetActiveObject,CoGetObjectLiteraltype hints to thedynamicparameter.2. Overload Mapping for Interface Specification
CreateObject,GetActiveObject,GetClassObject,CoGetClassObject,CoCreateInstanceEx@overloadsignatures to link theinterfaceargument directly to the function's return type in the eyes of static analyzers.3. Type-Safe Pointers for Low-Level Compatibility
CreateObject,GetClassObject,CoGetClassObject,CoCreateInstanceExpServerInfoto include_CArgObject.