Skip to content

Commit

Permalink
fix: ts
Browse files Browse the repository at this point in the history
  • Loading branch information
anc95 committed Jun 11, 2024
1 parent fe06fb8 commit e9b67e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const importTransformer = async (path: string, config: Record<string, any>) => {
const transformer = await requireOrImportModule<Transformer>(path);

if (!transformer.process && !transformer.processAsync) {
if (transformer.createTransformer) {
return transformer.createTransformer(config || {});
if ((transformer as any).createTransformer) {
return (transformer as any).createTransformer(config || {});
}

return null;
Expand Down Expand Up @@ -156,7 +156,7 @@ const createTransformer = (): Transformer<Config> => {
sourceText: string,
sourcePath: string,
options: TransformOptions<Config>
): string => {
): any => {
const transformers = getFlattenTransformers(options);

return transformers.reduce(
Expand Down

0 comments on commit e9b67e8

Please sign in to comment.