mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #44341 hast: update hast property type by @ChristianMurphy
* update hast property type documented at https://github.com/syntax-tree/hast#properties properties are primitive types or a list of number or string. discussed at https://github.com/rehypejs/rehype-document/pull/9#discussion_r417123004 * add more tests for properties
This commit is contained in:
parent
a095649c04
commit
0504976c2e
@ -73,6 +73,9 @@ const properties: Properties = {
|
||||
propertyName2: ['propertyValue2', 'propertyValue3'],
|
||||
propertyName3: true,
|
||||
propertyName4: 47,
|
||||
propertyName5: [4, "4"],
|
||||
propertyName6: null,
|
||||
propertyName7: undefined
|
||||
};
|
||||
|
||||
function getElement(): Element {
|
||||
|
||||
3
types/hast/index.d.ts
vendored
3
types/hast/index.d.ts
vendored
@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/syntax-tree/hast
|
||||
// Definitions by: lukeggchapman <https://github.com/lukeggchapman>
|
||||
// Junyoung Choi <https://github.com/rokt33r>
|
||||
// Christian Murphy <https://github.com/ChristianMurphy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
@ -72,7 +73,7 @@ export interface Element extends Parent {
|
||||
* Represents information associated with an element.
|
||||
*/
|
||||
export interface Properties {
|
||||
[PropertyName: string]: any;
|
||||
[PropertyName: string]: boolean | number | string | null | undefined | Array<string | number>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user