Skip to content
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

Support dual package #12

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Support dual package #12

wants to merge 1 commit into from

Conversation

Yang-33
Copy link
Owner

@Yang-33 Yang-33 commented Mar 24, 2024

  • exampleがコンパイルできない問題の修正
  • cjs project by ts
  • esm project by ts
  • manual test

@Yang-33
Copy link
Owner Author

Yang-33 commented Mar 24, 2024

export type Event = AccountLinkEvent | ActivatedEvent | BeaconEvent | BotResumedEvent | BotSuspendedEvent | DeactivatedEvent | PnpDeliveryCompletionEvent | FollowEvent | JoinEvent | LeaveEvent | MemberJoinedEvent | MemberLeftEvent | MessageEvent | ModuleEvent | PostbackEvent | ThingsEvent | UnfollowEvent | UnsendEvent | VideoPlayCompleteEvent | UnknownEvent;
がindex.d.tsから消えている...

@Yang-33
Copy link
Owner Author

Yang-33 commented Mar 24, 2024

これに限らず、openapiベースのtypeが全部exportされてないな...

@Yang-33
Copy link
Owner Author

Yang-33 commented Mar 24, 2024

#11 と合体させたら動く...? -> そんなことはない(#11+#12 -> #13)

@Yang-33
Copy link
Owner Author

Yang-33 commented Mar 24, 2024

ということでtsupか、lib/** が間違っている

@Yang-33 Yang-33 mentioned this pull request Mar 24, 2024
@Yang-33
Copy link
Owner Author

Yang-33 commented Mar 24, 2024

export * from "./exceptions";
export * from "./types";
import * as channelAccessToken from "./channel-access-token/api";
export { channelAccessToken };
import * as insight from "./insight/api";
export { insight };
import * as liff from "./liff/api";
export { liff };
import * as manageAudience from "./manage-audience/api";
export { manageAudience };
import * as messagingApi from "./messaging-api/api";
export { messagingApi };
// Note: `module` is reserved word in Javascript.
import * as moduleOperation from "./module/api";
export { moduleOperation };
import * as moduleAttach from "./module-attach/api";
export { moduleAttach };
import * as shop from "./shop/api";
export { shop };
import * as webhook from "./webhook/api";
export { webhook };
ここでexportしているもので、さらに引っ張ってきているファイルの中で * をつかっているとだめらしい(どうして...)

@Yang-33
Copy link
Owner Author

Yang-33 commented Mar 24, 2024

export * from ありうる一番下のレベルのファイル をtoplevelのindex.tsに書くしかない?

実際書くと動く。また export * from ファイル の中でexport * from していたらそれらはだめ。

@Yang-33
Copy link
Owner Author

Yang-33 commented Mar 24, 2024

というか /distの中も結構怪しいけど大丈夫かこれ...

@Yang-33
Copy link
Owner Author

Yang-33 commented Mar 24, 2024

2種tsconfig.jsonビルドが一番良さそう...

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.

1 participant