ziggy icon indicating copy to clipboard operation
ziggy copied to clipboard

Allow for .ts routes file

Open Stnaire opened this issue 2 years ago • 1 comments

Small changes to allow the generate command to output .ts files.

Stnaire avatar Feb 24 '24 12:02 Stnaire

Thanks! This makes sense but it needs a bit more work. Just thinking out loud, I'm happy to make these changes.

  • Need to add/update tests.
  • Need to check a bit more carefully in the first path normalization because if they pass a .d.ts filename I think that'll make it through and be used by Ziggy to generate the file, which I don't think we want.
  • I think the generated file may contain type errors, we might need something like this but I'm not sure and I don't know if there would be other side effects:
declare global {
    var Ziggy: Config;
}

bakerkretzmar avatar Feb 26 '24 22:02 bakerkretzmar