-
Notifications
You must be signed in to change notification settings - Fork 3
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
Service Dependency Type-Checking #38
Commits on Jul 18, 2023
-
feat(types): Add TypedConstructable type
This utility type allows us to easily type classes with both an expected instance type, and a set list of arguments.
Configuration menu - View commit details
-
Copy full SHA for 092ab05 - Browse repository at this point
Copy the full SHA 092ab05View commit details -
feat(Service): introduce Service type-checking
While this implementation is very... verbose, it does work and I see no practical way around it in the current version of TypeScript. I've tried to condense the documentation by way of TSDoc inheritDoc tags, but they don't actually display in solutions such as VSCode. This makes the documentation worse, as the docs for each static overload wouldn't be visible without scrolling to the generic fall-through overload. Currently, the "everything is an option object" overload isn't type-checked. This makes the code a bit less verbose, but it may be desirable.
Configuration menu - View commit details
-
Copy full SHA for f518d99 - Browse repository at this point
Copy the full SHA f518d99View commit details -
fix(Service): add type-detection for built-ins
Add support for using built-ins as dependencies in the type-checking algorithm.
Configuration menu - View commit details
-
Copy full SHA for 8ab5b5c - Browse repository at this point
Copy the full SHA 8ab5b5cView commit details -
feat(Service): type-check built-ins correctly
Ensure built-ins are converted to the correct type when type-checking dependencies. For instance, String should convert to string.
Configuration menu - View commit details
-
Copy full SHA for 49592f6 - Browse repository at this point
Copy the full SHA 49592f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 21f2d43 - Browse repository at this point
Copy the full SHA 21f2d43View commit details -
fix(Service): remove type-check test code
The code was never meant to make it into a commit, but oh well.
Configuration menu - View commit details
-
Copy full SHA for f62bcd7 - Browse repository at this point
Copy the full SHA f62bcd7View commit details -
style(Service): rename MaybeTransformBuiltIn to MapBuiltInToNativeType
The new name is more descriptive of what the type does.
Configuration menu - View commit details
-
Copy full SHA for 623641b - Browse repository at this point
Copy the full SHA 623641bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7d8cf4 - Browse repository at this point
Copy the full SHA d7d8cf4View commit details -
refactor(Service): replace ServiceSubject with ServiceWithDependencies
Furthermore, simplify the type-resolution algorithm and remove its dependency on arrays with a fixed number of items. The new implementation is compatible with arrays of any size. A major advantage of this implementation is that it **dramatically** simplifies the implementation of dependency type-checking, while also removing the need for multiple Service / JSService overloads. Overall, this means much less code duplication.
Configuration menu - View commit details
-
Copy full SHA for 540f676 - Browse repository at this point
Copy the full SHA 540f676View commit details -
fix(JSService): tighten implementation signature
This brings the JSService in-line with that of Service.
Configuration menu - View commit details
-
Copy full SHA for 70f156e - Browse repository at this point
Copy the full SHA 70f156eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 307c4be - Browse repository at this point
Copy the full SHA 307c4beView commit details -
Configuration menu - View commit details
-
Copy full SHA for dbd46fd - Browse repository at this point
Copy the full SHA dbd46fdView commit details -
refactor(JSService): rename service-subject to typed-dependencies
This makes it more clear what the file does.
Configuration menu - View commit details
-
Copy full SHA for c20a986 - Browse repository at this point
Copy the full SHA c20a986View commit details -
fix(JSService): introduce TSignore
This is temporary. I'd like to find a better way. However, currently TypeScript thinks the type is excessively deep if we cast it.
Configuration menu - View commit details
-
Copy full SHA for c560aac - Browse repository at this point
Copy the full SHA c560aacView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3eb580f - Browse repository at this point
Copy the full SHA 3eb580fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c0abbe - Browse repository at this point
Copy the full SHA 2c0abbeView commit details