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

DynamicScheme is impossible to construct in TypeScript #151

Open
JoshuaBrest opened this issue May 13, 2024 · 0 comments
Open

DynamicScheme is impossible to construct in TypeScript #151

JoshuaBrest opened this issue May 13, 2024 · 0 comments

Comments

@JoshuaBrest
Copy link

In the current TypeScript implementation, it is impossible to construct a DynamicScheme. The constructor for DynamicScheme requires the Variant enum, which is not a const enum. This enum is not exported. Additionally, no functionality is available to auto-generate a DynamicScheme from a given color or image, which limits dynamic usability.

Fix

File: typescript/index.ts

  export * from './dynamiccolor/dynamic_color.js';
  export * from './dynamiccolor/dynamic_scheme.js';
  export * from './dynamiccolor/material_dynamic_colors.js';
+ export * from './dynamiccolor/variant.js';
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

No branches or pull requests

1 participant