4.4.0 • Published 2 days ago

@markuplint/types v4.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

@markuplint/types

npm version

Type declaration and value checker

Type declaration

API

import { check } from '@markuplint/types';

check('2020-01-01', 'DateTime');
// => { matched: true }

check('2020-02-30', 'DateTime');
// => {
// 	matched: false,
// 	reason: { type: 'out-of-range', gte: 1, lte: 29 },
// 	expects: [],
// 	partName: 'date',
// 	ref: 'https://html.spec.whatwg.org/multipage/text-level-semantics.html#datetime-value',
// 	raw: '30',
// 	offset: 8,
// 	length: 2,
// 	line: 1,
// 	column: 9,
// }

Type Identifiers

IdentifierUse onSpecSupported
AnySome attributes
NoEmptyAnySome attributes
OneLineAnySome attributes
ZeroSome attributes
NumberSome attributes
UintSome attributes
XMLNamesvg\|[attributeName] and moreXML
DOMIDThe id attribute and moreWHATWG
FunctionBodyEvent handler attributes🚧
Patterninput[pattern]WHATWG
DateTimetime[datetime] and moreWHATWG
TabIndexThe tabindex attributeWHATWG
BCP47The lang attribute and moreRFC
URLSome attributesWHATWG
AbsoluteURLThe itemtype attribute (as list)WHATWG
HashNameimg[usemap]WHATWG
OneCodePointCharThe accesskey attribute (as list)WHATWG
CustomElementNameThe is attributeWHATWG
BrowsingContextNameUse NavigableTargetName instead.Obsolated
BrowsingContextNameOrKeywordUse NavigableTargetNameOrKeyword instead.Obsolated
NavigableTargetNameiframe[name] and moreWHATWG
NavigableTargetNameOrKeyworda[target] and moreWHATWG
HTTPSchemaURLa[ping] (as list) and moreWHATWG
MIMETypeembed[type] and moreWHATWG
ItemPropThe itemprop attribute (as list)WHATWG
Srcsetimg[srcset] and moreWHATWG
SourceSizeListimg[sizes] and moreWHATWG
IconSizelink[sizes] (as list)WHATWG
AutoCompleteinput[autocomplete] and moreWHATWG
Acceptinput[accept]WHATWG
SerializedPermissionsPolicyiframe[allow]W3C
<css-declaration-list>The style attributeCSS
<class-list>The class attributeSVG
<svg-font-size>Some attributes for SVGCSS🚧
<svg-font-size-adjust>Some attributes for SVGCSS🚧
<'color-profile'>Some attributes for SVGSVG🚧
<'color-rendering'>Some attributes for SVGSVG🚧
<'enable-background'>Some attributes for SVGSVG🚧
<list-of-svg-feature-string>Some attributes for SVGSVG🚧
<animatable-value>Some attributes for SVGSVG🚧
<begin-value-list>Some attributes for SVGSVG🚧
<end-value-list>Some attributes for SVGSVG🚧
<list-of-value>Some attributes for SVGSVG🚧
<clock-value>Some attributes for SVGSMIL🚧
<color-matrix>Some attributes for SVGW3C
<dasharray>Some attributes for SVGSVG
<key-points>Some attributes for SVGSVG
<key-splines>Some attributes for SVGSVG
<key-times>Some attributes for SVGSVG
<system-language>Some attributes for SVGSVG
<origin>Some attributes for SVGSMIL
<svg-path>Some attributes for SVGSVG🚧
<points>Some attributes for SVGSVG
<preserve-aspect-ratio>Some attributes for SVGSVG
<view-box>Some attributes for SVGSVG
<rotate>Some attributes for SVGSVG
<text-coordinate>Some attributes for SVGSVG
<list-of-lengths>Some attributes for SVG
<list-of-numbers>Some attributes for SVG
<list-of-percentages>Some attributes for SVG
<number-optional-number>Some attributes for SVG

In addition, you can use types CSSTree defined.

Install

$ npm install @markuplint/types

$ yarn add @markuplint/types
4.4.0

2 days ago

4.3.0

20 days ago

4.2.0

1 month ago

4.1.1-dev.1

1 month ago

4.1.0

1 month ago

4.0.3-alpha.0

2 months ago

4.0.2

3 months ago

4.0.1

3 months ago

4.0.0-rc.1

3 months ago

4.0.0

3 months ago

4.0.0-alpha.12

3 months ago

4.0.0-rc.0

3 months ago

4.0.0-alpha.11

3 months ago

4.0.0-alpha.10

3 months ago

4.0.0-dev.23

3 months ago

4.0.0-dev.12

3 months ago

4.0.0-alpha.9

4 months ago

4.0.0-alpha.8

4 months ago

4.0.0-alpha.7

4 months ago

4.0.0-dev.20

4 months ago

4.0.0-dev.10

5 months ago

4.0.0-alpha.5

6 months ago

4.0.0-alpha.6

5 months ago

4.0.0-alpha.3

7 months ago

4.0.0-alpha.4

6 months ago

3.9.1

8 months ago

4.0.0-alpha.1

9 months ago

3.0.0-dev.300

7 months ago

4.0.0-alpha.2

7 months ago

3.9.0

10 months ago

3.10.0

7 months ago

3.12.0

5 months ago

4.0.0-dev.0

5 months ago

3.0.0-dev.290

7 months ago

4.0.0-dev.28

7 months ago

3.11.0

7 months ago

3.0.0-dev.186

1 year ago

3.8.0

11 months ago

3.6.0

1 year ago

3.7.0

12 months ago

3.4.0

1 year ago

3.0.0-dev.96

1 year ago

3.0.0-dev.95

1 year ago

3.3.0

1 year ago

3.5.1

1 year ago

3.5.0

1 year ago

3.0.0-dev.177

1 year ago

3.0.0-dev.176

1 year ago

3.2.0

1 year ago

3.0.0-dev.25

1 year ago

3.0.0-dev.24

1 year ago

3.0.0-alpha.6

1 year ago

3.0.0-canary.5

1 year ago

2.2.1

1 year ago

2.2.2

1 year ago

3.0.0-alpha.5

1 year ago

3.0.0-dev.43

1 year ago

3.0.0-dev.42

1 year ago

3.0.0-dev.40

1 year ago

3.1.0

1 year ago

3.0.0-dev.38

1 year ago

3.0.0-rc.2

1 year ago

2.2.2-canary.2

1 year ago

3.0.0-rc.1

1 year ago

3.0.0-rc.0

1 year ago

3.0.0

1 year ago

3.0.0-rc.5

1 year ago

3.0.0-rc.4

1 year ago

3.0.0-rc.3

1 year ago

3.0.0-alpha.27

1 year ago

3.0.0-dev.50.40

1 year ago

2.2.2-canary.4

1 year ago

3.0.0-dev.54

1 year ago

3.0.0-dev.51

1 year ago

3.0.0-alpha.1

2 years ago

3.0.0-alpha.3

2 years ago

3.0.0-alpha.2

2 years ago

3.0.0-alpha.4

2 years ago

2.2.0

2 years ago

3.0.0-alpha.0

2 years ago

2.1.0

2 years ago

2.0.0-rc.3

2 years ago

2.0.0-rc.5

2 years ago

1.0.0-rc.1

2 years ago

2.0.0-rc.6

2 years ago

2.0.0

2 years ago