Skip to content

Commit

Permalink
fix(cli): explicit import of world as type (#1206)
Browse files Browse the repository at this point in the history
Co-authored-by: pwrstudio <pwrpntr@gmail.com>
  • Loading branch information
holic and pwrstudio committed Jul 28, 2023
1 parent 70e4d8e commit e259ef7
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .changeset/mean-pans-study.md
@@ -0,0 +1,6 @@
---
"@latticexyz/cli": patch
"@latticexyz/std-client": patch
---

Generated `contractComponents` now properly import `World` as type
3 changes: 2 additions & 1 deletion .prettierignore
@@ -1,4 +1,5 @@
dist
**/types/ethers-contracts
**/.next
templates/phaser/packages/art
templates/phaser/packages/art
**/contractComponents.ts
6 changes: 5 additions & 1 deletion e2e/packages/client-vanilla/src/mud/contractComponents.ts
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/render-ts/renderRecsV1Tables.ts
Expand Up @@ -6,7 +6,7 @@ export function renderRecsV1Tables(options: RecsV1TableOptions) {

return `/* Autogenerated file. Do not edit manually. */
import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import { defineComponent, Type as RecsType, type World } from "@latticexyz/recs";
export function defineContractComponents(world: World) {
return {
Expand Down
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down
@@ -1,6 +1,10 @@
/* Autogenerated file. Do not edit manually. */

import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
import {
defineComponent,
Type as RecsType,
type World,
} from "@latticexyz/recs";

export function defineContractComponents(world: World) {
return {
Expand Down

0 comments on commit e259ef7

Please sign in to comment.