This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Facade gen comments information out generating illegal code #32
Comments
I thought that it might be to do with the colons and hypons not being valid field names, but I've tested by modifying the source files to: interface Style extends StyleOptions {
'hover'?: StyleOptions;
'focus'?: StyleOptions;
'placeholder'?: StyleOptions;
'selection'?: StyleOptions;
'webkit-autofill'?: StyleOptions;
} yet still the field names are commented out: @anonymous
@JS()
abstract class Style implements StyleOptions {
external StyleOptions get String /*"hover"*/;
external set String /*"hover"*/ (StyleOptions v);
external StyleOptions get String /*"focus"*/;
external set String /*"focus"*/ (StyleOptions v);
external StyleOptions get String /*"placeholder"*/;
external set String /*"placeholder"*/ (StyleOptions v);
external StyleOptions get String /*"selection"*/;
external set String /*"selection"*/ (StyleOptions v);
external StyleOptions get String /*"webkit-autofill"*/;
external set String /*"webkit-autofill"*/ (StyleOptions v); |
As well as the above examples there are loads of other areas of this definition file that also don't generate the enums: type brandType = 'Visa' | 'American Express' | 'MasterCard' | 'Discover' | 'JCB' | 'Diners Club' | 'Unknown';
type checkType = 'pass' | 'fail' | 'unavailable' | 'unchecked';
type fundingType = 'credit' | 'debit' | 'prepaid' | 'unknown';
type tokenizationType = 'apple_pay' | 'android_pay';
// ...
tokenization_method?: tokenizationType; Results in more commented out code and falls back to supporting /*type brandType = 'Visa' |
'American Express' |
'MasterCard' |
'Discover' |
'JCB' |
'Diners Club' |
'Unknown';*/
/*type checkType = 'pass' | 'fail' | 'unavailable' | 'unchecked';*/
/*type fundingType = 'credit' | 'debit' | 'prepaid' | 'unknown';*/
/*type tokenizationType = 'apple_pay' | 'android_pay';*/
// ...
external set tokenization_method(String /*'apple_pay'|'android_pay'*/ v); |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I’m using dart_js_facade_gen and it’s generating this class that is causing errors. It appears to be commenting out information that would lead to illegal field names, this is causing errors.
Example:
Ths causes the following error:
error: error: line 610 pos 29: getter 'String' conflicts with previously declared getter external StyleOptions get String /*":focus"*/;
The type source file: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/stripe-v3/index.d.ts#L230
Here is the complete generated file: https://github.com/jimmyff/stripe_js_facade/blob/master/lib/src/stripe_js_facade.dart
The text was updated successfully, but these errors were encountered: