Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
import type as well (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler authored Dec 7, 2020
1 parent 11b0b1e commit 174c10c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanity-codegen",
"version": "0.2.3",
"version": "0.2.4",
"private": true,
"description": "",
"repository": {
Expand Down
20 changes: 10 additions & 10 deletions src/generate-types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('generate-types', () => {
const result = await generateTypes({ types: [foo] });

expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down Expand Up @@ -205,7 +205,7 @@ describe('generate-types', () => {
const result = await generateTypes({ types: [foo] });

expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down Expand Up @@ -266,7 +266,7 @@ describe('generate-types', () => {

expect(result.includes('name?: string')).toBe(true);
expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down Expand Up @@ -351,7 +351,7 @@ describe('generate-types', () => {
const result = await generateTypes({ types: [foo] });

expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down Expand Up @@ -462,7 +462,7 @@ describe('generate-types', () => {
const result = await generateTypes({ types: [foo, bar] });

expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down Expand Up @@ -587,7 +587,7 @@ describe('generate-types', () => {
const result = await generateTypes({ types: [foo, bar, baz] });

expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down Expand Up @@ -709,7 +709,7 @@ describe('generate-types', () => {
const result = await generateTypes({ types: [foo] });

expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down Expand Up @@ -787,7 +787,7 @@ describe('generate-types', () => {
const result = await generateTypes({ types: [foo] });

expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down Expand Up @@ -871,7 +871,7 @@ describe('generate-types', () => {
const result = await generateTypes({ types: [foo, bar, baz] });

expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down Expand Up @@ -977,7 +977,7 @@ describe('generate-types', () => {
});

expect(result).toMatchInlineSnapshot(`
"import {
"import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down
2 changes: 1 addition & 1 deletion src/generate-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ async function generateTypes({

const typeStrings = [
`
import {
import type {
SanityReference,
SanityAsset,
SanityImage,
Expand Down

0 comments on commit 174c10c

Please sign in to comment.