Skip to content
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

function as argument bug #1

Closed
d9k opened this issue Sep 3, 2024 · 2 comments
Closed

function as argument bug #1

d9k opened this issue Sep 3, 2024 · 2 comments

Comments

@d9k
Copy link

d9k commented Sep 3, 2024

Got interesting bug when I pass anonymous function as argument to another function:

Input:

import { debounce } from '@/helpers';

export default {
    methods: {
        changeBody: debounce(function (event) {
            console.log('debounce test');
        }),
    },
};

Ouput:

import { debounce } from '@/helpers';

// Methods
const changeBody = functiondebounce(function (event) {
	console.log('debounce test');
})

Selection_2024-09-03_18-42-23_01

@abdul-alhasany
Copy link
Contributor

Thanks for reporting. It probably the AST taking the first argument as the function name. I will see what I can do

@abdul-alhasany abdul-alhasany transferred this issue from kalimahapps/vue-options-to-composition Sep 30, 2024
@abdul-alhasany
Copy link
Contributor

This is fixed in latest update

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

No branches or pull requests

2 participants