---
title: "init(type:length:_:)"
framework: network
role: symbol
role_heading: Initializer
path: "network/tlv/init(type:length:_:)-7awe"
---

# init(type:length:_:)

Create TLV with the specified sizes for the type and length fields.

## Declaration

```swift
init<T, L, BelowProtocol>(type: T.Type, length: L.Type, @ProtocolStackBuilder<BelowProtocol> _ builder: () -> BelowProtocol) where T : Sendable, T : UnsignedInteger, L : Sendable, L : UnsignedInteger, BelowProtocol : MessageProtocol
```

## Parameters

- `type`: The object type to use for the type field.
- `length`: The object type to use for the length field.
- `builder`: The protocol stack below TLV.
