@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.
@@ -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.slice().map(token => ({
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.slice().map(token => ({
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('../../types').Result;
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
- * @see https://mimesniff.spec.whatwg.org/#valid-mime-type-with-no-parameters
9
- */
10
- withoutParameters?: boolean;
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.0",
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": "a83e0f5f214a9bbcc0286b9e269074ddca6189e7"
36
+ "gitHead": "0c47b2c2722f6823a17f36edbab98486275f8ab4"
36
37
  }