Skip to content

Conversation

joetannenbaum
Copy link
Collaborator

This PR adds the ability to still chain the original method name from the controller even if it's a reserved word in JavaScript. For example:

import PostController, { deleteMethod } from "@actions/App/Http/Controllers/PostController";

// Changed to `deleteMethod` beacuse `delete` is a reserved keyword in TypeScript
deleteMethod();

// Original method chained off of the controller (but you lose tree-shaking)
PostController.delete();

@joetannenbaum joetannenbaum merged commit 97bbe67 into main Apr 4, 2025
4 checks passed
@joetannenbaum joetannenbaum deleted the original-method-exports branch April 4, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant