# Function createRef

- createRef(ref): LayerReference | SublayerReference | undefined

- Creates a LayerReference or SublayerReference from various input types.

  #### Parameters

  - ref:
    | string
    | number
    | Layer
    | SublayerLike
    | LayerReference
    | SublayerReference

    The reference, which can be a string, number, LayerReference, SublayerReference, Layer, or SublayerLike.

  #### Returns LayerReference | SublayerReference | undefined

  A LayerReference or SublayerReference object.