-
Notifications
You must be signed in to change notification settings - Fork 146
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
[Bug]: Issues importing types from @comfyorg/comfyui-frontend-types: types not exported #2083
Comments
Inspecting a bit further, I see that in |
What is your use case for |
Hi, Thank you for your quick answer, much appreciated! getCustomWidgets(app) {
return {
MY_CUSTOM_TYPE(node, inputName, inputData, app) {
// I guess inputData is of type InputSpec here?
}
}
} Am I correct? Beyond that, I must admit: I also need a few other type imports that are not covered and probably not useful for most people: So, as a summary:
|
Hmmm, I should probably test it out myself by writing an example extension with the type library. Thanks for flagging that out! |
While completing my migration, I also encountered 2 other small issues:
beforeRegisterNodeDef?(
nodeType: typeof LGraphNode,
nodeData: ComfyNodeDef,
app: ComfyApp
): Promise<void> | void
I thought you might be interested in these ones, too. Hope this helps. |
Frontend Version
v1.5.19 (but not relevant here). NPM package
@comfyorg/comfyui-frontend-types
v1.6.8Expected Behavior
When importing package
@comfyorg/comfyui-frontend-types
in my own Comfy TS project, expecting to be able to import types.Actual Behavior
Just an example with
InputSpec
: if I try to import it to add proper typings to my function, I get the following:Module '"@comfyorg/comfyui-frontend-types"' declares 'InputSpec' locally, but it is not exported.
Steps to Reproduce
In a TS file, just add
import { InputSpec } from '@comfyorg/comfyui-frontend-types'
Debug Logs
N/A
Browser Logs
N/A
Setting JSON
N/A
What browsers do you use to access the UI ?
Mozilla Firefox
Other
Hello,
Not 100% here is the right place to post this, please tell me otherwise.
As stated above, I am trying to convert my soon-to-be-published custom node repo to Typescript.
To do so, I have installed both NPM packages
@comfyorg/litegraph
and@comfyorg/comfyui-frontend-types
.I didn't face issues importing from the former, but do get many like the one above with the latter.
When I inspect the code from this repo, I see that
InputSpec
is exported (insrc/types/apiTypes.ts
, line 319):But when I check the types from NPM package, type is not exported (
@comfyorg/comfyui-frontend-types/index.d.ts
, line 1009):Same with many other types:
ComfyWidgetConstructor
, ...Did I miss something, and could you kindly guide me?
One fact I find surprising: out of 33,000 lines in
@comfyorg/comfyui-frontend-types/index.d.ts
, theexport
keyword is only present 4 times, for:ComfyApi
(interface + class),ComfyApp
,ComfyExtension
.Plus a strange empty
export { }
at the very bottom. Possibly an issue with bundler?Thanks in advance for your help, and once again sorry if it's not the right place to post about it.
┆Issue is synchronized with this Notion page by Unito
The text was updated successfully, but these errors were encountered: