
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
builderio-field-types
Advanced tools
Builder Type Extensions is a set of helpful extension definitions for writing powerful well structured TypeScript codebases. The current library contains support for input field extraction.
This package exports types that make inferring Builder's Component Input Types. The BuilderFields
and GenerateItems
are used together to infer the input array into a properly structured list of properties for your component.
Here's a sample input:
const inputs = [
{
name: "name",
type: "string",
},
{
name: "favouriteColours",
type: "list",
subFields: [
{
name: "name",
type: "string",
defaultValue: "",
},
{
name: "hex",
type: "color",
},
],
},
] as const;
type InputProps = BuilderFields<GenerateItems<typeof inputs>>;
Note The input must be cast as const or the inference will not work as expected.
The above structured input fields would translate into the following type:
type InputProps = {
name: string;
favouriteColours: {
name: string;
hex: string;
}[];
};
In your framework of choice you should be able to cast input properties with the resulting type:
function MyComponent(props: InputProps) => {
console.log(props.name);
console.log(props.favouriteColors);
};
1.0.0
- Initial release
1.0.1
- Fixed packaging module issues
FAQs
A set of TypeScript helpers for BuilderIO's SDK.
The npm package builderio-field-types receives a total of 0 weekly downloads. As such, builderio-field-types popularity was classified as not popular.
We found that builderio-field-types demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.