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

alternate to current main parameter's syntax #19

Closed
cmichaelgraham opened this issue May 1, 2015 · 4 comments
Closed

alternate to current main parameter's syntax #19

cmichaelgraham opened this issue May 1, 2015 · 4 comments

Comments

@cmichaelgraham
Copy link
Contributor

I'd like you to implement an option for an alternate to the current syntax generated for the main parameter. This is what I would like it to look like:

declare module 'aurelia-metadata' {
    export * from 'aurelia-metadata/index';
}

If you were to do that (and with the more complete fix here), i will be able to automatically generate the Aurelia type definition files.

here's the code i use at the end of the generate function to output the above syntax:

        if (options.main) {
            output.write(("declare module '" + options.name + "' {") + eol + indent);
            output.write(("export * from '" + options.main + "';") + eol);
            output.write('}' + eol);
            sendMessage("Aliased main module " + options.name + " to " + options.main);
        }
@mtraynham
Copy link
Contributor

+1

@UhhhWaitWhat
Copy link

I would like to second this as well.

Edit
Just realised we need

declare module 'aurelia-metadata' {
    export {default} from 'aurelia-metadata/index';
    export * from 'aurelia-metadata/index';
}

If we have a default export?

@kitsonk
Copy link
Contributor

kitsonk commented Nov 3, 2015

I think we need to consider namespace wrapping as well, since module is no longer the preferred way of isolating these things.

@mribichich
Copy link

+1 In my case I have an index.js as the main, and the generator outputs:

declare module 'tss-lib/index'

it would be great if it could output:

declare module 'tss-lib'

@kitsonk kitsonk closed this as completed in 11f8a54 Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants