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

Analyze the possibility to use Records on sum types when the interface is not updatable #11

Open
jodinathan opened this issue Nov 3, 2023 · 0 comments

Comments

@jodinathan
Copy link
Owner

VSCode extension API has this function:

export function createWebviewPanel(viewType: string, title: string, showOptions: ViewColumn | {
			/**
			 * The view column in which the {@link WebviewPanel} should be shown.
			 */
			readonly viewColumn: ViewColumn;
			/**
			 * An optional flag that when `true` will stop the panel from taking focus.
			 */
			readonly preserveFocus?: boolean;
		}, options?: WebviewPanelOptions & WebviewOptions): WebviewPanel;

Records aren't updatable so we can't use it freely with sum types, however, when the sum type is being used as an input like WebviewPanelOptions & WebviewOptions above, we may be able to generate a Record to be used instead of Object

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