Improve `baseUrl` handling for relative URLs
Remove unnecessary baseUrl storage from generated classes and streamline relative URL resolution to only occur during JSON-LD decoding. Changes: - Remove baseUrl property and getter from generated vocabulary classes - Remove baseUrl option from class constructors - Add explicit baseUrlVar parameter to scalar type decoder methods - Use optional chaining (options?.baseUrl) for safer URL resolution - Maintain relative URL support without storing baseUrl in instances This improves upon PR #443's approach by avoiding unnecessary property storage while still resolving relative URLs when baseUrl is provided during fromJsonLd() calls.
Loading
Please register or sign in to comment