# 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

  - ##### `Optional` offset: number

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

  - Defined in core/base/dist/esm/utils/layout/serialize.d.ts:2

Generated using TypeDoc