Potential incorrect TS types for ClickCreatingTool.insertItem()


We were recently creating a custom ClickCreatingTool and noticed a potential issue with the TypeScript typings for the insertPart() return type.

The return typing currently specifies Part however in the documentation (ClickCreatingTool | GoJS API) it says you can also return null if it failed.

Should this return type be updated to Part | null or has it been set to just Part intentionally?

Thanks. Actually, after reviewing more of the API, that’s not the only place where we’re missing | null for the method return type. We’ll fix this for v2.2.