@tsclass/tsclass
v10.4.0
Published
Provides TypeScript definitions for various business, financial, networking, content, and other common classes.
Maintainers
Readme
@tsclass/tsclass
A comprehensive, domain-driven TypeScript type library that gives your projects consistent, battle-tested interfaces for business logic, finance, networking, content management, and more — all in one place. 🚀
Issue Reporting and Security
For reporting bugs, issues, or security vulnerabilities, please visit community.foss.global/. This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a code.foss.global/ account to submit Pull Requests directly.
Install
pnpm install @tsclass/tsclassor
npm install @tsclass/tsclass🧩 Module Overview
@tsclass/tsclass is organized into 14 domain modules, each focusing on a specific area. Import only what you need:
import {
authentication,
business,
finance,
network,
content,
container,
code,
database,
descriptors,
events,
general,
saas,
storage,
website,
} from '@tsclass/tsclass';Additionally, the library re-exports the entire type-fest collection plus a few custom utility types:
import type { typeFest, typeFestOwn } from '@tsclass/tsclass';Importing a Module Directly
Every module is also an entry point of its own, @tsclass/tsclass/<module>. It exports the module's types by their own names, so you can import one type without its namespace:
import type { TCurrency } from '@tsclass/tsclass/finance';
import type { TContact } from '@tsclass/tsclass/business';
const currency: TCurrency = 'EUR';TCurrency from @tsclass/tsclass/finance is the same type as finance.TCurrency from @tsclass/tsclass. Importing it by name lets you re-export it under its own name (export type { TCurrency } from '@tsclass/tsclass/finance') instead of declaring an alias of it, which tools that turn types into JSON Schema would count as a second type of the same name.
📚 Modules in Detail
🏢 business — Contacts, Contracts, Documents & More
The business module models real-world entities like people, companies, addresses, contracts, letters, and projects.
Contacts
| Type | Description |
|------|-------------|
| TContact | Discriminated union of TPerson \| TCompany |
| TPerson | A person with name, salutation, sex, optional legal proxy |
| TCompany | A company with registration details and, when known, its lifecycle status (planned → founding → active → liquidation → closed) with the dates that belong to it; a company whose status is not known states none |
| IAddress | Physical address with optional GPS coordinates |
| TSocialLinks | Social media link (facebook, twitter, linkedin, or custom) |
| TElectronicAddress | An electronic address with its scheme ({ scheme, value }, the scheme an EAS code such as EM for an email address or 0204 for a Leitweg-ID). Every contact may state one as electronicAddress: on the seller of an e-invoice it is the seller electronic address (EN 16931 BT-34), on the buyer the buyer electronic address (BT-49) |
| TRegistrationDetails | VAT ID (vatId, EN 16931 BT-31/BT-48), commercial register number (registrationId, BT-30/BT-47), registration name, and the optional tax number (taxNumber, the Steuernummer an invoice may state instead of the VAT ID under § 14 Abs. 4 Satz 1 Nr. 2 UStG; the seller's tax registration identifier BT-32) |
import { business } from '@tsclass/tsclass';
const company: business.TCompany = {
type: 'company',
name: 'Acme Corp',
address: {
streetName: 'Innovation Blvd',
houseNumber: '42',
postalCode: '28199',
city: 'Bremen',
country: 'Germany',
countryCode: 'DE',
},
description: 'Builds amazing things',
registrationDetails: {
vatId: 'DE123456789',
registrationId: 'HRB 12345',
registrationName: 'Amtsgericht Bremen',
},
status: 'active',
foundedDate: { day: 1, month: 6, year: 2020 },
};Documents & Letters
| Type | Description |
|------|-------------|
| TDocumentEnvelope<TYPE, FIELDS> | Base generic for all documents — includes id, versionInfo, language, pdf, objectActions |
| TLetterEnvelope<TYPE, FIELDS> | Extends document envelope with from, to, subject, and optional cover sheet |
| TLetterSimple | A simple letter |
| TLetter | Union of TLetterSimple \| finance.TAccountingDoc \| finance.TPaymentReminder — a simple letter, any accounting document (invoice, corrected invoice, credit note, debit note, self-billed invoice) or a payment reminder. Discriminate on type ('simple', 'accounting-doc', 'payment-reminder'), then on accountingDocType |
| IPdf | PDF with name, id, metadata, and buffer (Uint8Array) |
Contracts
| Type | Description |
|------|-------------|
| TContract | Union of all contract types |
| TEmploymentContract | Employment terms including compensation, position, probation |
| TNDAContract | Non-disclosure agreement with confidentiality terms |
| TServiceContract | Service agreement with scope, deliverables, payment terms |
| TLeaseContract | Property lease with address, rent, and deposit |
| TContractParty | A party to a contract, with signing order and signature status |
| TContractParagraph | Individual contract paragraph/clause |
Jobs & Projects
| Type | Description |
|------|-------------|
| IJob | Full job posting with salary, requirements, languages, and scraping history |
| ISalaryInfo | Salary range with currency and period |
| IProject | Software/business project with domain, social links, and tags |
💰 finance — Invoices, Payments, Currencies & Stock Prices
Everything money-related: invoices, credit notes, bank accounts, expenses, and market data.
Accounting Documents
| Type | Description |
|------|-------------|
| TAccountingDoc | Union of TInvoice \| TCorrectedInvoice \| TCreditNote \| TDebitNote \| TSelfBilledInvoice |
| TInvoice | Standard invoice |
| TCorrectedInvoice | Invoice correcting an issued invoice (§ 31 Abs. 5 UStDV), see below |
| TCreditNote | Credit note |
| TDebitNote | Debit note |
| TSelfBilledInvoice | Self-billed invoice |
| TAccountingDocItem | Line item with position, quantity, net price, VAT rate, and the optional VAT category (vatCategory, EN 16931 BT-151) with the note on an exemption (vatExemptionReason, vatExemptionReasonCode: BT-120 and BT-121) |
| TVatCategory | 'S' \| 'Z' \| 'E' \| 'AE' \| 'K' \| 'G' \| 'O' \| 'L' \| 'M': standard rated, zero rated, exempt, reverse charge, intra-community supply, export, not subject to VAT, IGIC, IPSI. An item without one is reverse charge (AE) when the document states reverseCharge, standard rated (S) otherwise |
| TAccountingDocStatus | 'draft' \| 'issued' \| 'paid' \| 'canceled' \| 'refunded' |
The seller and buyer electronic addresses (BT-34, BT-49) are from.electronicAddress and to.electronicAddress. The document-level electronicAddress is deprecated: it is the seller's (BT-34), and it is removed in the next major version.
import { finance } from '@tsclass/tsclass';
const item: finance.TAccountingDocItem = {
position: 1,
name: 'Consulting Services',
unitType: 'hour',
unitQuantity: 40,
unitNetPrice: 150,
vatPercentage: 19,
};
// an exempt item states its category and the note on the exemption (§ 14 Abs. 4 Satz 1 Nr. 8 UStG)
const exemptItem: finance.TAccountingDocItem = {
position: 2,
name: 'Medical treatment',
unitType: 'piece',
unitQuantity: 1,
unitNetPrice: 80,
vatPercentage: 0,
vatCategory: 'E',
vatExemptionReason: 'Steuerfrei nach § 4 Nr. 14 Buchst. a UStG',
vatExemptionReasonCode: 'VATEX-EU-132-1C',
};Corrected Invoices
An invoice that lacked a mandatory detail or stated one incorrectly is corrected by a document that refers specifically and unambiguously to it (§ 31 Abs. 5 UStDV). TCorrectedInvoice (accountingDocType: 'corrected-invoice') is that document; in an e-invoice it has the document type code 384 (corrected invoice), and an issued one carries a preceding invoice reference (BG-3). The correction of an e-invoice has to be an e-invoice as well, "unter Verwendung des entsprechenden Rechnungstyps" (BMF letter of 15 October 2024, III C 2 - S 7287-a/23/10001 :007, Rn. 49; Abschnitt 14.11 Abs. 1 Sätze 7 bis 9 UStAE, inserted by the BMF letter of 15 October 2025, III C 2 - S 7287-a/00019/007/243). An e-invoice cannot carry only the corrected details, so a corrected invoice is a complete invoice: it states every detail again, the corrected ones included.
correctedInvoice names the invoice it corrects by number (documentId) and issueDate. corrections lists the details it supplies (defect: 'missing') or corrects (defect: 'incorrect'), at least one when present, named after § 14 Abs. 4 Satz 1 UStG: 'parties' (Nr. 1), 'supplier-tax-number' (Nr. 2), 'issue-date' (Nr. 3), 'invoice-number' (Nr. 4), 'supply-description' (Nr. 5), 'supply-date' (Nr. 6), 'net-amount' (Nr. 7), 'tax' (Nr. 8), 'retention-note' (Nr. 9), or 'special-case-detail' for a detail § 14a UStG requires.
An issuer has to refer to the corrected invoice "spezifisch und eindeutig" (§ 31 Abs. 5 Satz 2 UStDV). Where an e-invoice corrects an invoice issued in another form although an e-invoice was due, Abschnitt 15.2a Abs. 7 Satz 3 UStAE (inserted by the BMF letter of 15 October 2025, III C 2 - S 7287-a/00019/007/243) requires the same: "Die E-Rechnung muss dann durch eine spezifische und eindeutige Bezugnahme auf die ursprüngliche Rechnung zum Ausdruck bringen, dass es sich um eine berichtigte Rechnung handelt." So a corrected invoice you issue states correctedInvoice with both the number and the issue date, and corrections; issuing software enforces that. The type leaves all three optional because a received e-invoice with type code 384 is valid without them: EN 16931 has no element for what is corrected, the issue date (BT-26) is optional, and XRechnung only warns when the preceding invoice reference (BG-3) is missing (BR-DE-26).
| Type | Description |
|------|-------------|
| TCorrectedInvoice | The correction: every accounting document field plus correctedInvoice and corrections (at least one when present), both optional so a received document fits; an issuer states both |
| TCorrectedInvoiceReference | The corrected invoice's documentId (its number) and issueDate (optional, as BT-26 is; an issuer states it); the same type as TInvoiceReference |
| TInvoiceCorrection | One corrected detail and its defect ('missing' \| 'incorrect') |
| TInvoiceMandatoryDetail | The mandatory invoice details a correction can concern |
import { finance } from '@tsclass/tsclass';
// the day of supply was missing on invoice 2026-0042
const correction: Pick<finance.TCorrectedInvoice, 'correctedInvoice' | 'corrections' | 'deliveryDate'> = {
correctedInvoice: { documentId: '2026-0042', issueDate: Date.UTC(2026, 8, 1) },
corrections: [{ detail: 'supply-date', defect: 'missing' }],
deliveryDate: Date.UTC(2026, 7, 28),
};Due Date
dueInDays is the payment term in days after the document's date, and it is optional. EN 16931 makes the payment due date (BT-9) optional: an e-invoice with a positive amount due for payment (BT-115) has to state the due date or the payment terms (BT-20, a text) (BR-CO-25), and a document whose amount due is zero or negative, such as a settled invoice, may state neither. A document that states no due date leaves dueInDays out. Consumers read its absence as "no due date stated" and never substitute a default term.
Paid Amount and Advance Payments
Every accounting document can state paidAmount, the gross sum received before it was issued (EN 16931 BT-113). The amount due for payment (BT-115) is the gross total less it, plus any rounding amount (BR-CO-16). Payments received after issue are not part of the document; a payment reminder's outstandingAmount says what is still owed.
A final invoice (Endrechnung), which invoices the whole supply after advance payments, has to deduct the considerations received before the supply and the tax on them when invoices with separately stated tax were issued for them (§ 14 Abs. 5 Satz 2 UStG; Abschnitt 14.8 Abs. 7 UStAE). An invoice, a corrected invoice or a self-billed invoice lists them in advancePayments, at least one when present. Each TAdvancePayment carries:
invoice: the advance invoice (TInvoiceReference:documentId,issueDate), a preceding invoice reference (BG-3) in an e-invoice; absent for a payment received without one;receivedOn: the day it was received;vatGroups: what was received per VAT rate,percentage,netandvat, at least one.
Only what was received counts: an advance invoice issued but not paid is not listed, and one paid in part is listed with the amount received, since tax arises only on that (Abschnitt 14.8 Abs. 2 and Abs. 5 Satz 4 UStAE). The UStAE lets a final invoice deduct the payments one by one, as one total of the considerations and one of the tax, or as gross totals with the tax they contain stated in addition (Abschnitt 14.8 Abs. 7 Sätze 2 and 3), or state them in addition or in an annex instead of deducting them (Abs. 8). These are ways of printing; the type carries the amounts per payment and per rate so that any of them can be printed.
When advancePayments is present, paidAmount equals their gross sum, the net plus the vat of every group. Software writing the document checks that and refuses a mismatch; it does not recompute either value.
An invoice over the remaining consideration only (Restrechnung, Abschnitt 14.8 Abs. 11 UStAE) states no advance payments. For an e-invoice the BMF recommends it: the requirements on a final invoice cannot yet be expressed in the structured part, and until 31 December 2027 a final invoice issued as an e-invoice may carry the deductions as an unstructured annex (BMF letter of 15 October 2024, Rn. 47 and 48).
| Type | Description |
|------|-------------|
| TInvoiceReference | An issued invoice by documentId (its number) and optional issueDate |
| TAdvancePayment | An amount received before the supply: optional invoice and receivedOn, and vatGroups (at least one) |
| TAdvancePaymentVatGroup | The part received at one VAT rate: percentage, net, vat |
| TFinalInvoiceFields | advancePayments, on TInvoice, TCorrectedInvoice and TSelfBilledInvoice |
import { finance } from '@tsclass/tsclass';
// Abschnitt 14.8 Abs. 7 UStAE, Beispiel 2: price 1,428,000; 1,190,000 received in advance
const deductions: Pick<finance.TInvoice, 'advancePayments' | 'paidAmount'> = {
advancePayments: [
{ invoice: { documentId: 'AR-2026-001' }, vatGroups: [{ percentage: 19, net: 500000, vat: 95000 }] },
{ invoice: { documentId: 'AR-2026-002' }, vatGroups: [{ percentage: 19, net: 500000, vat: 95000 }] },
],
paidAmount: 1190000,
};Payment Reminders
A payment reminder (Zahlungserinnerung, Mahnung) asks for payment of documents already issued. It is a letter, not an accounting document: it supplies nothing and carries no VAT. What it asks to be paid is the outstandingAmount of every claim plus the amount of every charge, all in its currency. The envelope's id is the reminder number. A claim invoiced in another currency gets a reminder of its own in that currency: the debt stays owed in it, and where the debtor may pay in euro (§ 244 BGB) the rate is the one at the time of payment.
Default interest states its basis so the debtor can check it: the principal, the base rate (Basiszinssatz, § 247 BGB), the legal basis with its surcharge points ('bgb-288-1': 5 points on any money debt; 'bgb-288-2': 9 points on a claim for consideration no consumer is party to; 'bgb-288-2-2002': 8 points on such a claim whose obligation arose from 1 January 2002 to 28 July 2014, which Art. 229 § 34 Satz 1 EGBGB leaves under § 288 Abs. 2 BGB in its version of 1 January 2002 (a continuing obligation that arose earlier comes under that version from 1 January 2003, Art. 229 § 5 Satz 2 EGBGB; an older obligation that is not continuing stays under the law before it), except a continuing obligation (Dauerschuldverhältnis) for consideration rendered after 30 June 2016, which Art. 229 § 34 Satz 2 EGBGB puts under the current version and so at 9 points), the resulting ratePercent and the period from from to to, both days inclusive. The base rate changes on 1 January and 1 July, so each half-year period is a charge of its own. The amount is principal × ratePercent / 100 × days / 365 with actual calendar days (actual/365, as German courts compute it). The default lump sum of § 288 Abs. 5 BGB accrues per claim, so it names its claimDocumentId. When a reminder fee or other cost is a cost of legal pursuit, the lump sum is credited against it (§ 288 Abs. 5 Satz 3 BGB): the cost's lumpSumOffsets record which lump sums were credited, and its amount is the cost less them.
| Type | Description |
|------|-------------|
| TPaymentReminder | The reminder: claims (at least one), charges, currency, optional dueInDays (a reminder needs no deadline of its own, § 286 Abs. 1 Satz 1 BGB), reminderLevel, paymentOptions and notes |
| TPaymentReminderClaim | A reminded invoice, corrected invoice or debit note: number, issue date, optional due date, gross total and outstanding amount |
| TPaymentReminderCharge | An additional amount without VAT, discriminated on chargeType: default interest (with its interest computation), the default lump sum (per claim), a reminder fee or another collection cost (with optional lumpSumOffsets) |
| TPaymentReminderDefaultInterest | How default interest was computed: principal, base rate, legal basis and surcharge points, rate, and the inclusive from and to dates of one half-year period |
| TPaymentReminderLumpSumOffset | A default lump sum credited against a cost of legal pursuit |
| TPaymentReminderChargeType | 'default-interest' \| 'default-lump-sum' \| 'reminder-fee' \| 'other-cost' |
import { finance } from '@tsclass/tsclass';
const claims: finance.TPaymentReminder['claims'] = [
{
documentType: 'invoice',
documentId: 'RE-2025-0042',
issueDate: Date.UTC(2025, 7, 1),
dueDate: Date.UTC(2025, 7, 15),
totalGross: 1190,
outstandingAmount: 1190,
},
];
const charges: finance.TPaymentReminderCharge[] = [
{
chargeType: 'default-interest',
description: 'Verzugszinsen 16.08.2025 bis 31.08.2025',
amount: 5.36, // 1190 × 10.27 / 100 × 16 / 365, rounded to the cent
claimDocumentId: 'RE-2025-0042',
interest: {
principal: 1190,
baseRatePercent: 1.27, // Basiszinssatz from 1 July 2025
legalBasis: 'bgb-288-2',
surchargePoints: 9,
ratePercent: 10.27,
from: Date.UTC(2025, 7, 16),
to: Date.UTC(2025, 7, 31),
},
},
{
chargeType: 'default-lump-sum',
description: 'Verzugspauschale (§ 288 Abs. 5 BGB)',
amount: 40,
claimDocumentId: 'RE-2025-0042',
},
];Payments & Banking
| Type | Description |
|------|-------------|
| ISepaConnection | SEPA bank details (IBAN, BIC) |
| IPayPalConnection | PayPal email connection |
| IPaymentOptionInfo | Available payment methods, and the optional remittance information the payer quotes with the payment (paymentReference, the Verwendungszweck; EN 16931 BT-83) |
| ICheckingAccount | Bank account with currency and transactions |
| ITransaction | A financial transaction |
Other Finance Types
| Type | Description |
|------|-------------|
| TCurrency | Union of ~170 ISO 4217 currency codes (including crypto: BTC, ETH, ADA, etc.) |
| IStockPrice | Real-time stock quote with market state, exchange info, and provider |
| IExpenseItem | Expense line item |
| IVoucher | Expense voucher/receipt |
import { finance } from '@tsclass/tsclass';
const stock: finance.IStockPrice = {
ticker: 'AAPL',
price: 195.83,
currency: 'USD',
change: 2.47,
changePercent: 1.28,
previousClose: 193.36,
timestamp: new Date(),
provider: 'Yahoo Finance',
marketState: 'REGULAR',
exchange: 'NASDAQ',
exchangeName: 'NASDAQ Global Select',
};🌐 network — DNS, Certificates, SSH, JWT & HTTP
Types for infrastructure, networking, and web request/response handling.
| Type | Description |
|------|-------------|
| ICert | SSL/TLS certificate with keys and CSR |
| IDnsRecord | DNS record with type, value, and DNSSEC status |
| TDnsRecordType | All common DNS record types (A, AAAA, CNAME, MX, TXT, SRV, CAA, HTTPS, etc.) |
| IDnsChallenge | DNS challenge for ACME verification |
| IConvenientDnsProvider | DNS provider interface with ACME challenge methods |
| IDomainDelegation | Parsed domain components (subdomain, domain, public suffix) |
| ICnameDescriptor | CNAME proxy configuration with optional SSL |
| IReverseProxyConfig | Reverse proxy config with authentication |
| ISshKey | SSH key pair |
| IJwtKeypair | JWT signing key pair (PEM format) |
| INetworkNode | Network node with IPv4/IPv6 and security level |
| IDevice | Network device with resolution and manufacturer |
| ISimpleRequest / ISimpleResponse | Simplified HTTP request/response |
| IRenderFunction | (req: ISimpleRequest) => Promise<ISimpleResponse> |
import { network } from '@tsclass/tsclass';
const record: network.IDnsRecord = {
name: 'example.com',
type: 'A',
value: '93.184.216.34',
dnsSecEnabled: true,
};🔐 authentication — Claims & JWT Processing
| Type | Description |
|------|-------------|
| IClaim | JWT payload with userName, userId, validUntil, roles |
| IProcessedClaim | Verified JWT with original token, decoded claim, and signed flag |
📋 code — Commit Info & Status Objects
| Type | Description |
|------|-------------|
| ICommitInfo | Project name, version and description, with an optional changelog (string[]) |
| IStatusObject | Named status report with optional id, lastUpdated and combinedStatus, a combinedStatusText, and a list of details (each with name, value, status, statusText) |
| TStatus | Status value ('ok' \| 'partly_ok' \| 'not_ok') |
📦 container — Docker & OCI Containers
| Type | Description |
|------|-------------|
| IContainer | Container image reference (registry, tag, version, labels) |
| IVolumeMount | Host-to-container volume mapping |
📝 content — Articles, Authors & Documentation
| Type | Description |
|------|-------------|
| IArticle<T> | Content article with title, body, tags, optional featured image, and generic reference object |
| IAuthor | Author with name, birthday, and article list |
| IDocumentationSet | Collection of articles forming a documentation set |
🗄️ database — MongoDB, Object Lifecycle & Wrappers
| Type | Description |
|------|-------------|
| IMongoDescriptor | MongoDB connection string and credentials |
| IObjectAction | Audit trail entry: timestamp, userId, action name, message |
| IObjectStatus | Object lifecycle status (active \| inactive \| hidden \| markedForDeletion) with scheduled deletion |
| IWrappedData<T> | Generic data wrapper |
🔧 descriptors — Service Connection Descriptors
A convenience aggregation module that collects connection descriptors from across the library, plus adds its own.
| Type | Description |
|------|-------------|
| IMongoDescriptor | Re-exported from database |
| IStorageDescriptor | Re-exported from storage |
| IS3Descriptor | Deprecated alias for IStorageDescriptor |
| ICloudflareDescriptor | Cloudflare API auth token |
| ILetterExpressDescriptor | LetterExpress API credentials |
📡 events — Domain Event Types
| Type | Description |
|------|-------------|
| IEvent_Contract | Contract/subscription event |
| IEvent_Money | Monetary transfer event (SEPA, credit card, PayPal, Cardano) |
| IEvent_Release | Software release event (npm, Docker, App Store, Google Play) |
| IEvent_Request | HTTP request event with duration |
| IEvent_Session | User session event (new or reactivated) |
| IEvent_User | User event placeholder |
📅 general — Foundational Types
| Type | Description |
|------|-------------|
| IDate | Simple calendar date (day, month, year) — used across many modules |
| ITime | Time representation (placeholder for extension) |
☁️ saas — Products & Subscription Plans
| Type | Description |
|------|-------------|
| IProduct | SaaS product with features, landing page, and publisher |
| IProductFeature | Product feature block with heading and link |
| ISubscriptionPlan | Subscription plan with pricing terms, units, and contained products |
💾 storage — S3-Compatible Storage
| Type | Description |
|------|-------------|
| IStorageDescriptor | S3-compatible storage connection (endpoint, credentials, bucket, region) |
| IS3Descriptor | ⚠️ Deprecated — use IStorageDescriptor |
🌍 website — Links, Menus & Navigation
| Type | Description |
|------|-------------|
| ILink | Hyperlink with URL, text, icon, and target |
| ILinkBlock | Titled group of links |
| IMenuItem<T, U> | Menu item with async action callback |
🏗️ Architecture: The Document Hierarchy
One of the most powerful aspects of @tsclass/tsclass is its layered document type hierarchy. Documents build on each other using generic envelope types:
TDocumentEnvelope ← Base: id, version, language, PDF, object actions
├── TLetterEnvelope ← Adds: from, to, subject, cover sheet
│ ├── TAccountingDocEnvelope ← Adds: items, currency, payment, due date
│ │ ├── TInvoice
│ │ ├── TCorrectedInvoice ← Adds: correctedInvoice, corrections
│ │ ├── TCreditNote
│ │ ├── TDebitNote
│ │ └── TSelfBilledInvoice
│ └── TPaymentReminder ← Adds: claims, charges, currency, payment term
└── TContractEnvelope ← Adds: parties, paragraphs, dates
├── TEmploymentContract
├── TNDAContract
├── TServiceContract
└── TLeaseContractThis means an TInvoice automatically has all the fields of a letter (sender, recipient, subject) and a document (version info, PDF attachment, audit trail). No duplication, full consistency. ✨
Because every accounting document and the payment reminder sit under TLetterEnvelope, TLetter accepts all of them — a corrected invoice, credit note, debit note, self-billed invoice or payment reminder is a letter just like an invoice is, so letter pipelines (rendering, PDF generation, postal dispatch) never need a cast to TInvoice.
🔧 Utility Types
The library also re-exports type-fest in its entirety plus two custom utility types:
| Type | Description |
|------|-------------|
| typeFestOwn.SecondArgument<T> | Extracts the second argument type from a function |
| typeFestOwn.ValueType<T> | Extracts the value type from an object type |
import type { typeFest, typeFestOwn } from '@tsclass/tsclass';
type MyPartial = typeFest.PartialDeep<SomeComplexType>;
type Val = typeFestOwn.ValueType<{ a: number; b: string }>; // number | stringLicense and Legal Information
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the LICENSE file.
Please note: The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
Company Information
Task Venture Capital GmbH Registered at District Court Bremen HRB 35230 HB, Germany
For any legal inquiries or further information, please contact us via email at [email protected].
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
