Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
function checkPropTypes
import { checkPropTypes } from "https://deno.land/x/servest@v1.3.4/vendor/https/dev.jspm.io/@types/prop-types/index.d.ts";

Assert that the values match with the type specs. Error messages are memorized and will only be shown once.

Parameters

typeSpecs: any

Map of name to a ReactPropType

values: any

Runtime values that need to be type-checked

location: string

e.g. "prop", "context", "child context"

componentName: string

Name of the component for error messages

optional
getStack: () => any

Returns the component stack