[{"data":1,"prerenderedAt":246,"buildId":247},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fparser-ts\u002Foptions":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":245,"source":4},"extensions\u002Fkubb-labs\u002Fparser-ts\u002Foptions.md",{},"Options",{"type":8,"value":9,"toc":236},"minimark",[10,26,31,79,83,86,93,133,207,217,233],[11,12,13,17,18,21,22,25],"p",{},[14,15,16],"code",{},"parserTs()"," and ",[14,19,20],{},"parserTsx()"," take one option, ",[14,23,24],{},"extension",", which sets the extension on the relative imports and exports they write.",[27,28,30],"h2",{"id":29},"options-overview","Options overview",[32,33,34,50],"table",{},[35,36,37],"thead",{},[38,39,40,44,47],"tr",{},[41,42,43],"th",{},"Option",[41,45,46],{},"Purpose",[41,48,49],{},"Default",[51,52,53],"tbody",{},[38,54,55,64,74],{},[56,57,58],"td",{},[59,60,62],"a",{"href":61},"#extension",[14,63,24],{},[56,65,66,67,17,70,73],{},"Extension written on relative ",[14,68,69],{},"import",[14,71,72],{},"export"," specifiers.",[56,75,76],{},[14,77,78],{},"{ '.ts': '' }",[27,80,82],{"id":81},"option-details","Option details",[84,85,24],"h3",{"id":24},[11,87,88,89,92],{},"Maps the extension of a generated file to the extension its relative specifiers get. ",[14,90,91],{},"''"," drops the extension. Package specifiers and the file names on disk never change.",[32,94,95,103],{},[35,96,97],{},[38,98,99,101],{},[41,100],{},[41,102],{},[51,104,105,115,125],{},[38,106,107,110],{},[56,108,109],{},"Type",[56,111,112],{},[14,113,114],{},"Record\u003Cstring, string>",[38,116,117,120],{},[56,118,119],{},"Required",[56,121,122],{},[14,123,124],{},"false",[38,126,127,129],{},[56,128,49],{},[56,130,131],{},[14,132,78],{},[32,134,135,148],{},[35,136,137],{},[38,138,139,142,145],{},[41,140,141],{},"Value",[41,143,144],{},"Writes",[41,146,147],{},"Use it when",[51,149,150,169,184],{},[38,151,152,157,162],{},[56,153,154,156],{},[14,155,78],{}," (default)",[56,158,159],{},[14,160,161],{},"import '.\u002Fapi'",[56,163,164,165,168],{},"A bundler or ",[14,166,167],{},"moduleResolution: 'bundler'"," resolves the files.",[38,170,171,176,181],{},[56,172,173],{},[14,174,175],{},"{ '.ts': '.js' }",[56,177,178],{},[14,179,180],{},"import '.\u002Fapi.js'",[56,182,183],{},"You compile the output to ESM JavaScript.",[38,185,186,191,196],{},[56,187,188],{},[14,189,190],{},"{ '.ts': '.ts' }",[56,192,193],{},[14,194,195],{},"import '.\u002Fapi.ts'",[56,197,198,199,202,203,206],{},"Node.js runs the ",[14,200,201],{},".ts"," files directly, or you compile with ",[14,204,205],{},"rewriteRelativeImportExtensions",".",[11,208,209,210,213,214,206],{},"The same map applies to the runtime templates a plugin copies into the output, such as the ",[14,211,212],{},".kubb\u002F"," files of ",[14,215,216],{},"@kubb\u002Fplugin-fetch",[218,219,221,222,225,226,229,230,206],"blockquote",{"as":220},"note","",[14,223,224],{},"parserTsx"," reads only its own map. Set the ",[14,227,228],{},".tsx"," key on it, such as ",[14,231,232],{},"parserTsx({ extension: { '.tsx': '.js' } })",[11,234,235],{},"A file whose extension has no key also loses its extension. A relative specifier without an extension stays unchanged.",{"title":221,"searchDepth":237,"depth":237,"links":238},5,[239,241],{"id":29,"depth":240,"text":30},2,{"id":81,"depth":240,"text":82,"children":242},[243],{"id":24,"depth":244,"text":24},3,"\u002Fextensions\u002Fkubb-labs\u002Fparser-ts\u002Foptions",1795727679750,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]