Skip to content

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

@jodinathan

Description

@jodinathan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions