
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
@glazed/types
Advanced tools
Shared types for Glaze packages
npm install --dev @glazed/types
Uses JWSSignature
from the dids
package
type EncodedDagJWS = {
payload: string
signatures: Array<JWSSignature>
link?: string
}
type EncodedDagJWSResult = {
jws: EncodedDagJWS
linkedBlock: string // base64
}
Uses JSONSchemaType
from the ajv
package
type Schema<T = Record<string, any>> = JSONSchemaType<T> & {
$comment?: string
title?: string
}
type ModelData<T> = {
definitions: Record<string, T>
schemas: Record<string, T>
tiles: Record<string, T>
}
type MapModelTypes<Model extends ModelData<any>, ToType> = {
schemas: Record<keyof Model['schemas'], ToType>
definitions: Record<keyof Model['definitions'], ToType>
tiles: Record<keyof Model['tiles'], ToType>
}
type CastModelTo<Model extends ModelData<any> | void, ToType> = Model extends ModelData<any>
? MapModelTypes<Model, ToType>
: ModelData<ToType>
type PublishedModel<Model extends ModelData<any> | void = void> = CastModelTo<Model, string>
type ModelTypeAliases<
// Schema alias to content type
Schemas extends Record<string, any> = Record<string, any>,
// Definition alias to schema alias
Definitions extends Record<string, keyof Schemas> = Record<string, string>,
// Tile alias to schema alias
Tiles extends Record<string, keyof Schemas> = Record<string, string>
> = {
schemas: Schemas
definitions: Definitions
tiles: Tiles
}
type ModelTypesToAliases<TypeAliases extends ModelTypeAliases> = MapModelTypes<TypeAliases, string>
type ManagedID = string // StreamID
Uses DagJWSResult
from the dids
package
type ManagedDoc<CommitType = DagJWSResult> = {
alias: string
commits: Array<CommitType>
version: string // CommitID
}
Uses DagJWSResult
from the dids
package
type ManagedEntry<CommitType = DagJWSResult> = ManagedDoc<CommitType> & {
schema: ManagedID
}
Uses DagJWSResult
from the dids
package
type ManagedSchema<CommitType = DagJWSResult> = ManagedDoc<CommitType> & {
dependencies: Record<string, Array<ManagedID>> // path to schemas ManagedID
}
Uses DagJWSResult
from the dids
package
type ManagedModel<CommitType = DagJWSResult> = {
schemas: Record<ManagedID, ManagedSchema<CommitType>>
definitions: Record<ManagedID, ManagedEntry<CommitType>>
tiles: Record<ManagedID, ManagedEntry<CommitType>>
}
Uses DagJWSResult
from the dids
package
type EncodedManagedModel = ManagedModel<EncodedDagJWSResult>
Dual licensed under MIT and Apache 2
@glazed/cli
v0.2.0
FAQs
Shared types for Glaze packages
The npm package @glazed/types receives a total of 239 weekly downloads. As such, @glazed/types popularity was classified as not popular.
We found that @glazed/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
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.