# Function serializeLayout

- serializeLayout<L, E>(layout, data, encoded?, offset?): E extends undefined
  ? Uint8Array
  : number

- #### Type Parameters

  - #### L extends layout.Layout

  - #### E extends Uint8Array = undefined

  #### Parameters

  - ##### layout: L

  - ##### data: layout.LayoutToType<L>

  - ##### `Optional` encoded: E

  - ##### offset: number = 0

  #### Returns E extends undefined
  ? Uint8Array
  : number

  - Defined in core/base/src/utils/layout/serialize.ts:22

Generated using TypeDoc