Skip to content

fix: add escape to CSS #371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1821,9 +1821,12 @@ declare var CryptoKeyPair: {
};

interface CSS {
Copy link
Contributor Author

@alan-agius4 alan-agius4 Feb 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect that the generated output is like the following;

interface CSS {
    supports(property: string, value?: string): boolean;
    escape(value: string): string;
}

declare var CSS: CSS;

However I cannot seem to make it like that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the generation script is not handling added static properties correctly.. i think i have a fix for that.

supports(property: string, value?: string): boolean;
escape(value: string): string;
}
declare var CSS: CSS;

declare var CSS: {
supports(property: string, value?: string): boolean;
};

interface CSSConditionRule extends CSSGroupingRule {
conditionText: string;
Expand Down
8 changes: 8 additions & 0 deletions inputfiles/addedTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -3058,5 +3058,13 @@
"interface": "HTMLElementEventMap",
"name": "\"focusout\"",
"type": "FocusEvent"
},
{
"kind": "method",
"name": "escape",
"interface": "CSS",
"signatures": [
"escape(value: string): string"
]
}
]