Skip to content

TS4058: Return type of exported function has or is using name WebSiteLeaf from external module ... but cannot be named #193

@btakita

Description

@btakita

When declaring an object to be a WebSite type, a TS4058 appears.

export function jsonld_WebSite_() { // TS4058
	return <WebSite>{
		'@type': 'WebSite',
		'@id': jsonld_WebSite_id,
		url: website,
		name: title,
		mainEntity: jsonld_Person_(),
	}
}

Looking at the source,

export type WebSite = WebSiteLeaf;

WebSiteLeaf is not in use anywhere else nor is it exported. It seems that WebSiteLeaf should be renamed to WebSite. The intermediate type is not necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions