Skip to content

Commit

Permalink
Fix TS Extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
cesurapp committed Mar 30, 2024
1 parent 438ed87 commit e98a1be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Thor/Template/typescript/flatten.ts.php
@@ -1,4 +1,5 @@
/* eslint-disable */
// @ts-nocheck

const { toString, hasOwnProperty } = Object.prototype;
const OBJECT_TYPE = '[object Object]';
Expand Down
2 changes: 1 addition & 1 deletion src/Thor/Template/typescript/resource.ts.php
Expand Up @@ -2,7 +2,7 @@
<?php if (count($resources)) {
echo PHP_EOL;
} ?>
<?php echo implode("\n", array_map(fn ($v) => sprintf("import { %s } from '../Resource/%s';", $v, $v), $resources)); ?>
<?php echo implode("\n", array_map(fn ($v) => sprintf("import type { %s } from '../Resource/%s';", $v, $v), $resources)); ?>
<?php if (count($resources)) {
echo PHP_EOL;
} ?>
Expand Down
2 changes: 1 addition & 1 deletion src/Thor/Template/typescript/response.ts.php
Expand Up @@ -2,7 +2,7 @@
<?php if (count($resources)) {
echo PHP_EOL;
} ?>
<?php echo implode("\n", array_map(fn ($v) => sprintf("import { %s } from '../Resource/%s';", $v, $v), $resources)); ?>
<?php echo implode("\n", array_map(fn ($v) => sprintf("import type { %s } from '../Resource/%s';", $v, $v), $resources)); ?>
<?php if (count($resources)) {
echo PHP_EOL;
} ?>
Expand Down

0 comments on commit e98a1be

Please sign in to comment.