amzn / style-dictionary

A build system for creating cross-platform styles.
https://styledictionary.com
Apache License 2.0
3.87k stars 543 forks source link

Missing `name` field on `File` type when using `javascript/object` or `javascript/umd`. #1004

Closed ConcernedHobbit closed 6 months ago

ConcernedHobbit commented 1 year ago

file.name is not specified in File.d.ts even though it is used in javascript/object and javascript/umd formats. This causes type errors when trying to use this functionality.

What's the suggested typing to use? The context is a Platform configuration in a StyleDictionary.Config.

https://github.com/amzn/style-dictionary/blob/2cf72f3f89996503608c238d7f3bcbab5b53e719/lib/common/formats.js#L289

jorenbroekema commented 6 months ago

Fixed in v4 branch