@markuplint/types 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/check-multi-types.d.ts +1 -4
- package/lib/check.d.ts +6 -5
- package/lib/css-syntax.js +11 -1
- package/lib/enum.d.ts +2 -1
- package/lib/enum.js +1 -1
- package/lib/get-candidate.d.ts +1 -4
- package/lib/list.d.ts +2 -1
- package/lib/match-result.d.ts +8 -21
- package/lib/number.d.ts +1 -1
- package/lib/primitive/is-quantity.d.ts +1 -1
- package/lib/primitive/is-uint.d.ts +3 -6
- package/lib/primitive/split-unit.d.ts +2 -2
- package/lib/token/token-collection.d.ts +58 -65
- package/lib/token/token-collection.js +5 -5
- package/lib/token/token.d.ts +53 -57
- package/lib/token/token.js +8 -12
- package/lib/token/types.d.ts +3 -0
- package/lib/token/types.js +2 -0
- package/lib/types.d.ts +55 -79
- package/lib/types.schema.d.ts +31 -1084
- package/lib/whatwg/check-autocomplete.js +2 -2
- package/lib/whatwg/check-datetime/datetime-tokens.d.ts +1 -21
- package/lib/whatwg/check-datetime/time-zone-offset-string.d.ts +1 -1
- package/lib/whatwg/check-mime-type.d.ts +4 -4
- package/package.json +4 -3
|
@@ -209,7 +209,7 @@ const checkAutoComplete = () => value => {
|
|
|
209
209
|
acLog('[Unmatched ("%s")] Unexpected token: "%s"', value, contactableFiledToken.value);
|
|
210
210
|
return contactableFiledToken.unmatched({
|
|
211
211
|
reason: 'unexpected-token',
|
|
212
|
-
expects: contactableFieldNames.
|
|
212
|
+
expects: contactableFieldNames.map(token => ({
|
|
213
213
|
type: 'const',
|
|
214
214
|
value: token,
|
|
215
215
|
})),
|
|
@@ -299,7 +299,7 @@ const checkAutoComplete = () => value => {
|
|
|
299
299
|
candidate = (0, get_candidate_1.getCandidate)(head.value, partOfAddress, autofillFieldNames, contactingTokens, contactableFieldNames);
|
|
300
300
|
}
|
|
301
301
|
else if (!hasContactingToken) {
|
|
302
|
-
expects.push(...contactingTokens.
|
|
302
|
+
expects.push(...contactingTokens.map(token => ({
|
|
303
303
|
type: 'const',
|
|
304
304
|
value: token,
|
|
305
305
|
})));
|
|
@@ -1,23 +1,3 @@
|
|
|
1
1
|
import type { TokenEachCheck } from '../../token/token-collection';
|
|
2
|
-
export declare const datetimeTokenCheck: Record<
|
|
3
|
-
| 'year'
|
|
4
|
-
| 'month'
|
|
5
|
-
| 'date'
|
|
6
|
-
| 'hour'
|
|
7
|
-
| 'minute'
|
|
8
|
-
| 'second'
|
|
9
|
-
| 'secondFractionalPart'
|
|
10
|
-
| 'week'
|
|
11
|
-
| 'hyphen'
|
|
12
|
-
| 'colon'
|
|
13
|
-
| 'extra'
|
|
14
|
-
| 'colonOrEnd'
|
|
15
|
-
| 'decimalPointOrEnd'
|
|
16
|
-
| 'localDateTimeSeparator'
|
|
17
|
-
| 'normalizedlocalDateTimeSeparator'
|
|
18
|
-
| 'plusOrMinusSign'
|
|
19
|
-
| 'weekSign',
|
|
20
|
-
TokenEachCheck
|
|
21
|
-
> &
|
|
22
|
-
Record<'_year' | '_month', number | null>;
|
|
2
|
+
export declare const datetimeTokenCheck: Record<'year' | 'month' | 'date' | 'hour' | 'minute' | 'second' | 'secondFractionalPart' | 'week' | 'hyphen' | 'colon' | 'extra' | 'colonOrEnd' | 'decimalPointOrEnd' | 'localDateTimeSeparator' | 'normalizedlocalDateTimeSeparator' | 'plusOrMinusSign' | 'weekSign', TokenEachCheck> & Record<'_year' | '_month', number | null>;
|
|
23
3
|
export declare function getMaxWeekNum(year: number): number;
|
|
@@ -4,4 +4,4 @@ import type { CustomSyntaxChecker } from '../../types';
|
|
|
4
4
|
* @see https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#time-zones
|
|
5
5
|
*/
|
|
6
6
|
export declare const checkTimeZoneOffsetString: CustomSyntaxChecker;
|
|
7
|
-
export declare function parseTimeZone(zone: string | Token): import(
|
|
7
|
+
export declare function parseTimeZone(zone: string | Readonly<Token>): import("../../types").Result;
|
|
@@ -4,8 +4,8 @@ import type { CustomSyntaxChecker } from '../types';
|
|
|
4
4
|
* @see https://mimesniff.spec.whatwg.org/#valid-mime-type
|
|
5
5
|
*/
|
|
6
6
|
export declare const checkMIMEType: CustomSyntaxChecker<{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @see https://mimesniff.spec.whatwg.org/#valid-mime-type-with-no-parameters
|
|
9
|
+
*/
|
|
10
|
+
withoutParameters?: boolean;
|
|
11
11
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Type declaration and value checker",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"@types/bcp-47": "1",
|
|
31
31
|
"@types/css-tree": "^2.0.1",
|
|
32
32
|
"@types/debug": "^4.1.7",
|
|
33
|
-
"@types/whatwg-mimetype": "2"
|
|
33
|
+
"@types/whatwg-mimetype": "2",
|
|
34
|
+
"type-fest": "^3.6.1"
|
|
34
35
|
},
|
|
35
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "0c47b2c2722f6823a17f36edbab98486275f8ab4"
|
|
36
37
|
}
|