Expected a value of type `undefined` for `author.test` but received `undefined`
See original GitHub issue'use strict';
const { struct } = require('../lib/superstruct/lib/index');
const Article = struct({
id: 'number',
author: {
id: 'number',
},
});
const data = {
id: 34,
author: {
id: 1,
test: undefined,
},
};
const article = Article(data);
console.log('article', article);
I use the struct to validate data from excel, some unsed keys are set to undefined, and I get an error like :
Expected a value of type undefined
for author.test
but received undefined
I try to partial, but it is not recursive. so I create this issues and a pull request.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Error : expected value of type 'String!' but value is undefined
I used this code in my stelve kit app. I want to sent the email to query data from graphql. I try to...
Read more >Zig Language Reference
This syntax tells the Zig compiler that the function will either return an error or a value. An error union type combines an...
Read more >Documentation - TypeScript 3.7
this is a new way to say that the value foo will be used when it's “present”; but when it's null or undefined...
Read more >LLVM Language Reference Manual
Abstract¶. This document is a reference manual for the LLVM assembly language. LLVM is a Static Single Assignment (SSA) based representation that provides ......
Read more >Solved: undefined - Power Platform Community - Microsoft
PLease help me to have null/blank value in the date column. ... expects one parameter: the object, array or string to test for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ok, maybe I replace
struct
struct.partial
in recursive.@saighost awesome, let us know if you find any issues. Thank you for taking the time to write up that PR either way!