# Function layoutDiscriminator

- layoutDiscriminator<B>(layouts, allowAmbiguous?): ((encoded) => B extends false
  ? LayoutIndex | null
  : readonly LayoutIndex[])

- #### Type Parameters

  - #### B extends boolean = false

  #### Parameters

  - ##### layouts: readonly layout.Layout[]

  - ##### `Optional` allowAmbiguous: B

  #### Returns ((encoded) => B extends false
  ? LayoutIndex | null
  : readonly LayoutIndex[])

  - - (encoded): B extends false
      ? LayoutIndex | null
      : readonly LayoutIndex[]

    - #### Parameters

      - ##### encoded: Uint8Array

      #### Returns B extends false
      ? LayoutIndex | null
      : readonly LayoutIndex[]

  - Defined in core/base/dist/esm/utils/layout/discriminate.d.ts:4

Generated using TypeDoc