4.6.4 • Published 8 months ago

@markuplint/types v4.6.4

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months 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
JSONAttributes on some frameworks etc.
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.6.3

8 months ago

4.6.4

8 months ago

4.6.2

8 months ago

4.6.1

8 months ago

4.6.0

9 months ago

4.5.4

10 months ago

4.5.3

12 months ago

4.5.2-alpha.0

1 year ago

4.5.2-alpha.1

1 year ago

4.5.2

1 year ago

4.5.1

1 year ago

4.5.0

1 year ago

4.4.1-alpha.0

1 year ago

4.4.1

1 year ago

4.4.0

1 year ago

4.3.0

1 year ago

4.2.0

1 year ago

4.1.1-dev.1

1 year ago

4.1.0

1 year ago

4.0.3-alpha.0

1 year ago

4.0.2

1 year ago

4.0.1

1 year ago

4.0.0-rc.1

1 year ago

4.0.0

1 year ago

4.0.0-alpha.12

1 year ago

4.0.0-rc.0

1 year ago

4.0.0-alpha.11

1 year ago

4.0.0-alpha.10

1 year ago

4.0.0-dev.23

1 year ago

4.0.0-dev.12

1 year ago

4.0.0-alpha.9

1 year ago

4.0.0-alpha.8

1 year ago

4.0.0-alpha.7

1 year ago

4.0.0-dev.20

1 year ago

4.0.0-dev.10

2 years ago

4.0.0-alpha.5

2 years ago

4.0.0-alpha.6

2 years ago

4.0.0-alpha.3

2 years ago

4.0.0-alpha.4

2 years ago

3.9.1

2 years ago

4.0.0-alpha.1

2 years ago

3.0.0-dev.300

2 years ago

4.0.0-alpha.2

2 years ago

3.9.0

2 years ago

3.10.0

2 years ago

3.12.0

2 years ago

4.0.0-dev.0

2 years ago

3.0.0-dev.290

2 years ago

4.0.0-dev.28

2 years ago

3.11.0

2 years ago

3.0.0-dev.186

2 years ago

3.8.0

2 years ago

3.6.0

2 years ago

3.7.0

2 years ago

3.4.0

2 years ago

3.0.0-dev.96

2 years ago

3.0.0-dev.95

2 years ago

3.3.0

2 years ago

3.5.1

2 years ago

3.5.0

2 years ago

3.0.0-dev.177

2 years ago

3.0.0-dev.176

2 years ago

3.2.0

2 years ago

3.0.0-dev.25

3 years ago

3.0.0-dev.24

3 years ago

3.0.0-alpha.6

3 years ago

3.0.0-canary.5

3 years ago

2.2.1

3 years ago

2.2.2

3 years ago

3.0.0-alpha.5

3 years ago

3.0.0-dev.43

2 years ago

3.0.0-dev.42

2 years ago

3.0.0-dev.40

2 years ago

3.1.0

2 years ago

3.0.0-dev.38

2 years ago

3.0.0-rc.2

3 years ago

2.2.2-canary.2

3 years ago

3.0.0-rc.1

3 years ago

3.0.0-rc.0

3 years ago

3.0.0

2 years ago

3.0.0-rc.5

3 years ago

3.0.0-rc.4

3 years ago

3.0.0-rc.3

3 years ago

3.0.0-alpha.27

3 years ago

3.0.0-dev.50.40

2 years ago

2.2.2-canary.4

3 years ago

3.0.0-dev.54

2 years ago

3.0.0-dev.51

2 years ago

3.0.0-alpha.1

3 years ago

3.0.0-alpha.3

3 years ago

3.0.0-alpha.2

3 years ago

3.0.0-alpha.4

3 years ago

2.2.0

3 years ago

3.0.0-alpha.0

3 years ago

2.1.0

3 years ago

2.0.0-rc.3

3 years ago

2.0.0-rc.5

3 years ago

1.0.0-rc.1

3 years ago

2.0.0-rc.6

3 years ago

2.0.0

3 years ago