jsdom / webidl2js

Auto-generate JS class structures for Web IDL specifications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can implementation classes default-export implementation, instead of having a single export?

domenic opened this issue · comments

We don't have any potential exports beside implementation, right? This would be a decent amount of churn on the jsdom side, but it seems easier to explain.

The original plan here was to allow for stuff like impl setup methods which are not part of the exposed interface. Not sure if we still need that for anything...

#58 (comment) has some discussion of why this might be a good idea, although it's not concrete enough for me to say that we definitely want to keep the current form, so I'll leave this open for now.

I believe that the following:

export default class SomeInterface {
	//
}

is better than:

class SomeInterface {
	//
}
export { SomeInterface as implementation };

I’m doing this in #141.