Skip to content

Fix types generate #1266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 6, 2021
Merged

Fix types generate #1266

merged 6 commits into from
Jul 6, 2021

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Jul 4, 2021

Fix

types generation in subpath module dist files.

in immutable/dist/immutable/index.d.ts. but source files won't be included in the published npm package

before

import { Middleware, SWRHook } from '../src/types';

after, import from published module

import { Middleware, SWRHook } from 'swr';

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 4, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 789c349:

Sandbox Source
SWR-Basic Configuration
SWR-States Configuration
SWR-Infinite Configuration
SWR-SSR Configuration

@huozhi huozhi marked this pull request as draft July 4, 2021 16:24
@huozhi huozhi removed the request for review from pacocoursey July 4, 2021 16:24
@huozhi huozhi requested review from shuding and pacocoursey July 4, 2021 16:33
@huozhi huozhi marked this pull request as ready for review July 4, 2021 16:33
Comment on lines 8 to 10
"..",
"./test",
"./jest-setup.ts"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

Suggested change
"..",
"./test",
"./jest-setup.ts"
"../test",
"../jest-setup.ts"

@@ -1,5 +1,5 @@
import hash from './hash'
import { Key } from '../types'
import { Key } from 'swr'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like a hack, it seems to be working fine though.

@shuding shuding mentioned this pull request Jul 6, 2021
4 tasks
@huozhi huozhi merged commit d83fb17 into master Jul 6, 2021
@huozhi huozhi deleted the fix/types-generate branch July 6, 2021 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants