Skip to content

Commit

Permalink
Generation script should give types imported correctly (#572)
Browse files Browse the repository at this point in the history
Import types correctly
  • Loading branch information
kfcampbell committed Jun 7, 2023
1 parent 434cb03 commit e7cd494
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/update-endpoints/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ async function generateRoutes() {
writeFileSync(
ALL_ENDPOINTS_PATH,
prettier.format(
`import { EndpointsDefaultsAndDecorations } from "../types";
`import type { EndpointsDefaultsAndDecorations } from "../types";
const Endpoints: EndpointsDefaultsAndDecorations = ${JSON.stringify(
sortKeys(newRoutes, { deep: true })
)}
export default Endpoints`,
{ parser: "typescript" }
)
Expand All @@ -94,11 +94,11 @@ async function generateRoutes() {
writeFileSync(
ADMIN_ENDPOINTS_PATH,
prettier.format(
`import { EndpointsDefaultsAndDecorations } from "../types";
`import type { EndpointsDefaultsAndDecorations } from "../types";
const Endpoints: EndpointsDefaultsAndDecorations = ${JSON.stringify(
sortKeys({ enterpriseAdmin: newRoutes.enterpriseAdmin }, { deep: true })
)}
export default Endpoints`,
{ parser: "typescript" }
)
Expand Down

0 comments on commit e7cd494

Please sign in to comment.