File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11import { wikibaseTimeToEpochTime , wikibaseTimeToISOString , wikibaseTimeToSimpleDay } from './time.js'
22import type { TimeInputValue } from './time.js'
3+ import type { DataType } from '../types/claim.js'
4+ import type { SimplifySnakOptions } from '../types/simplify_claims.js'
5+ import type { SnakValue } from '../types/snakvalue.js'
36
47const simple = datavalue => datavalue . value
58
@@ -105,9 +108,9 @@ for (const [ datatype, parser ] of Object.entries(parsers)) {
105108 normalizedParsers [ normalizeDatatype ( datatype ) ] = parser
106109}
107110
108- export function parseSnak ( datatype , datavalue , options ) {
111+ export function parseSnak ( datatype : DataType | void , datavalue : SnakValue , options : SimplifySnakOptions ) {
109112 // Known case of missing datatype: form.claims, sense.claims, mediainfo.statements
110- datatype = datatype || datavalue . type
113+ datatype = ( datatype || datavalue . type ) as DataType
111114
112115 try {
113116 // Known case requiring normalization
You can’t perform that action at this time.
0 commit comments