
Security News
Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Music Scraping
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.
@asterql/codegen
Advanced tools
Type inference and TypeScript declaration generation for AsterQL queries.
Type inference and TypeScript declaration generation for AsterQL.
This package evaluates an AsterQL AST over @asterql/schema TypeNodes. It does
not run the query against data. It predicts the shape a query returns so view
definitions, docs demos, editor tooling, and AI-authored routes can verify the
data contract before runtime.
import {
analyzeType,
generateTypeDeclaration,
inferType,
} from "@asterql/codegen";
import {
arrayType,
defineSchema,
objectType,
stringType,
} from "@asterql/schema";
const schema = defineSchema({
root: objectType({
posts: arrayType(
objectType({
id: stringType(),
title: stringType(),
}),
),
}),
});
const result = inferType("*.posts[] {id, title}", schema);
// result.type is a TypeNode for Array<{ id: string; title: string }>
const analysis = analyzeType("*.posts[] {id, title}", schema);
// analysis.nodes contains the typed input scope and output type for each AST node.
const declaration = generateTypeDeclaration("*.posts[] {id, title}", schema, {
typeName: "PostListView",
});
analyzeType(query, schema, options?): parse/evaluate a query and return the
final result plus per-AST-node typed scopes for editor tooling.inferType(query, schema, options?): parse/evaluate a query over TypeNodes.generateTypeDeclaration(query, schema, options?): infer the result and emit
a TypeScript declaration string.typeToTypeScript(type, options?): render a TypeNode as a TypeScript type.options.functions, options.reducers, and options.params let hosts provide
the same extension surface they use at runtime, but with static TypeNode return
signatures.
FAQs
Type inference and TypeScript declaration generation for AsterQL queries.
We found that @asterql/codegen demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.