Files
klz-cables.com/.pnpm-store/v10/files/a1/edd908ff4462056ff74b28d114a853a26a5269ef9db304e4f02296dec21f5cc1ba0bc072a350d881dca0c132965b2499f66d1d14e5de8a1934a3696c9df7ec
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

44 lines
1.5 KiB
Plaintext

import { expectType, expectError } from 'tsd'
import sjson from '..'
expectError(sjson.parse(null))
expectType<any>(sjson.parse('{"anything":0}'))
sjson.parse('"test"', null, { protoAction: 'remove' })
expectError(sjson.parse('"test"', null, { protoAction: 'incorrect' }))
sjson.parse('"test"', null, { constructorAction: 'ignore' })
expectError(sjson.parse('"test"', null, { constructorAction: 'incorrect' }))
expectError(sjson.parse('"test"', { constructorAction: 'incorrect' }))
sjson.parse('test', { constructorAction: 'remove' })
sjson.parse('test', { protoAction: 'ignore' })
sjson.parse('test', () => {}, { protoAction: 'ignore', constructorAction: 'remove' })
sjson.parse('"test"', null, { safe: true })
sjson.parse('"test"', { safe: true })
sjson.parse('test', () => {}, { safe: false })
sjson.parse('test', { protoAction: 'remove', safe: true })
expectError(sjson.parse('"test"', null, { safe: 'incorrect' }))
sjson.safeParse('"test"', null)
sjson.safeParse('"test"')
expectError(sjson.safeParse(null))
sjson.scan({}, { protoAction: 'remove' })
sjson.scan({}, { protoAction: 'ignore' })
sjson.scan({}, { constructorAction: 'error' })
sjson.scan({}, { constructorAction: 'ignore' })
sjson.scan([], {})
sjson.scan({}, { safe: true })
sjson.scan({}, { protoAction: 'remove', safe: false })
expectError(sjson.scan({}, { safe: 'incorrect' }))
declare const input: Buffer
sjson.parse(input)
sjson.safeParse(input)
sjson.parse('{"anything":0}', (key, value) => {
expectType<string>(key)
})
sjson.safeParse('{"anything":0}', (key, value) => {
expectType<string>(key)
})