Revamp functions to support methods and simplify overloads#260
Merged
srikrsna-buf merged 1 commit intomainfrom Jan 19, 2026
Merged
Revamp functions to support methods and simplify overloads#260srikrsna-buf merged 1 commit intomainfrom
srikrsna-buf merged 1 commit intomainfrom
Conversation
srikrsna-buf
commented
Jan 16, 2026
Comment on lines
+194
to
+197
| /** | ||
| * Temporary glue code for transistion. | ||
| */ | ||
| export function registryToFunctions(registry: FuncRegistry): CelFunc[] { |
Member
Author
There was a problem hiding this comment.
This and below will be removed once we migrate
Member
Author
There was a problem hiding this comment.
This file will be deleted once we migrate
Comment on lines
+52
to
+54
| function (b) { | ||
| return this.toLowerCase() == b.toLowerCase(); | ||
| }, |
Member
Author
There was a problem hiding this comment.
Notice the this in the function. For methods this implementation uses this instead of making the first argument the target. Felt like a clear way to distinguish between function and method implementations.
Member
Author
There was a problem hiding this comment.
This will replace the new func.ts once we complete the migration.
timostamm
approved these changes
Jan 19, 2026
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.
First of a few PRs to support a new way of dealing with functions. Adds support for distinguishing between methods and functions and a derived and stable id for each overload. This does away with the notion of overloads from the public api and simplifies creating functions and methods.
This PR doesn't yet change any of the standard/extension functions provided in the package as that will be huge diff, instead it adds a compatibility layer from the old way to the new. Once we migrate all of them, this layer will be removed.