New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

tyforge-temp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

tyforge-temp

Type-safe schema validation, Result pattern, and DDD building blocks for TypeScript

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

TyForge

npm version license TypeScript Node.js

Validacao de schemas type-safe, Result pattern e building blocks DDD para TypeScript.

Instalacao

npm install tyforge

Quick Start

import { SchemaBuilder, FString, FEmail, isSuccess, isFailure } from "tyforge";
import type { Schema } from "tyforge";

const userSchema = {
  name:  { type: FString, required: true },
  email: { type: FEmail, required: true },
} satisfies Schema;

const validator = SchemaBuilder.compile(userSchema);

const result = validator.create({
  name: "Maria Silva",
  email: "maria@navegar.com",
});

if (isSuccess(result)) {
  const props = result.value;
  props.name.getValue();  // "Maria Silva"
  props.email.getValue(); // "maria@navegar.com"
}

if (isFailure(result)) {
  console.error(result.error.detail); // mensagem de validacao
}

Modulos

ModuloDescricao
Result Patternok(), err(), map, flatMap, fold, match, all — error handling funcional
Schema BuilderValidacao compilada de schemas com inferencia de tipos
Type Fields25+ Value Objects validadores (FString, FEmail, FId, FInt, FDate...)
Domain ModelsEntity, ValueObject, Aggregate com domain events, Dto
Exceptions18 tipos RFC 7807 com stack trace lazy

Documentacao

Documentacao completa em tyforge.navegarsistemas.com.br.

Licenca

MIT - Navegar Sistemas

Keywords

typescript

FAQs

Package last updated on 22 Mar 2026

Related posts