question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Schema type declaration

See original GitHub issue
  • Operating System: Ubuntu 16.04 LTS
  • Node Version: 14.15.3
  • NPM Version: 6.14.10
  • webpack Version: ^4
  • schema-utils Version: ^3

Feature Proposal

Please add standalone Schema type declaration.

Currently is possible to import it manually from validate method type declarations, but it is not convenient:

import * as schemaUtils from "schema-utils";
import { Schema } from "schema-utils/declarations/validate";

Feature Use Case

To use typed schema object, that is passed into validate method.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Tofandelcommented, Dec 21, 2022

I’ll probably make a PR when https://github.com/ajv-validator/ajv/issues/2180 is resolved currently TS is too strict and requires a complete rewrite of the schema which will turn it into a big breaking change

0reactions
alexander-akaitcommented, Dec 21, 2022

Yeah, it was implemented in the such way because ajs had no types before, but a lot of things were changed, so PR welcome

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating element declarations in XML Schema: IU Only: Files
Step 1: Add a declaration for the simple element title. · Step 2: Declare the rest of the simple elements. · Step 3:...
Read more >
XML Schema Example - W3Schools
This chapter will demonstrate how to write an XML Schema. ... with the standard XML declaration followed by the xs:schema element that defines...
Read more >
Schemas and Types - GraphQL
Here, we're using a String type and marking it as Non-Null by adding an exclamation mark, ! after the type name. This means...
Read more >
Mongoose v6.8.2: SchemaTypes
Mongoose plugins can also add custom SchemaTypes like int32. ... You can declare a schema type using the type directly, or an object...
Read more >
Add Structured Data To Your How-To Pages | Documentation
The full definition of HowTo is available at schema.org/HowTo. The HowTo type indicates that the page contains a how-to. There must be one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found