@@ -7,7 +7,7 @@ import type {
77} from 'prettier' ;
88import { printers as estreePrinters } from 'prettier/plugins/estree.js' ;
99
10- import type { Options } from '../options.js' ;
10+ import type { PluginOptions } from '../options.js' ;
1111import {
1212 isGlimmerTemplate ,
1313 isGlimmerTemplateParent ,
@@ -32,13 +32,16 @@ export const printer: Printer<Node | undefined> = {
3232 return estreePrinter . getVisitorKeys ?.( node , nonTraversableKeys ) || [ ] ;
3333 } ,
3434
35- printPrettierIgnored ( path : AstPath < Node | undefined > , options : Options ) {
35+ printPrettierIgnored (
36+ path : AstPath < Node | undefined > ,
37+ options : PluginOptions ,
38+ ) {
3639 return printRawText ( path , options ) ;
3740 } ,
3841
3942 print (
4043 path : AstPath < Node | undefined > ,
41- options : Options ,
44+ options : PluginOptions ,
4245 print : ( path : AstPath < Node | undefined > ) => doc . builders . Doc ,
4346 args : unknown ,
4447 ) {
@@ -102,22 +105,22 @@ export const printer: Printer<Node | undefined> = {
102105 return async ( textToDoc ) => {
103106 if ( node && isGlimmerTemplate ( node ) ) {
104107 if ( checkPrettierIgnore ( path ) ) {
105- return printRawText ( path , embedOptions as Options ) ;
108+ return printRawText ( path , embedOptions as PluginOptions ) ;
106109 }
107110
108111 try {
109112 const content = await printTemplateContent (
110113 node . extra . template . contents ,
111114 textToDoc ,
112- embedOptions as Options ,
115+ embedOptions as PluginOptions ,
113116 ) ;
114117
115118 const printed = printTemplateTag ( content ) ;
116119 saveCurrentPrintOnSiblingNode ( path , printed ) ;
117120 return printed ;
118121 } catch ( error ) {
119122 console . error ( error ) ;
120- const printed = [ printRawText ( path , embedOptions as Options ) ] ;
123+ const printed = [ printRawText ( path , embedOptions as PluginOptions ) ] ;
121124 saveCurrentPrintOnSiblingNode ( path , printed ) ;
122125 return printed ;
123126 }
@@ -142,7 +145,7 @@ function trimPrinted(printed: doc.builders.Doc[]): void {
142145
143146function printRawText (
144147 { node } : AstPath < Node | undefined > ,
145- options : Options ,
148+ options : PluginOptions ,
146149) : string {
147150 if ( ! node ) {
148151 return '' ;
0 commit comments