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

export Factory Validators and GetSet #1673

Closed
wants to merge 1 commit into from
Closed

Conversation

StringKe
Copy link

@StringKe StringKe commented Nov 20, 2023

Makes it easier for users to extend any element in Konva, or to create new elements.

fix: #1672


https://github.com/konvajs/konva/blob/master/src/index-types.d.ts

Perhaps types should be exported directly, rather than using namespace, which is currently difficult to extend.

konva.export.ts

export { Container, ContinareConfig } from "./core"

index.ts

import * as Konva from "./konva.export"

export default Konva

@lavrton
Copy link
Member

lavrton commented Nov 27, 2023

I am not sure I want to move this API into public global Konva object. Can you just import in directly in your project?

import * as Validators from 'konva/lib/Validators';

@StringKe
Copy link
Author

That works. Thank you.

@StringKe StringKe closed this Nov 28, 2023
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.

[Typescript] Export GetSet types to the outside world.
2 participants