query
On this page

mkEmptyArray

lib.gvariant.mkEmptyArray

Docs pulled from | This Revision | about 1 hour ago


Returns the GVariant array from the given empty Nix list.

Inputs

elemType

1. Function argument

Type

mkEmptyArray :: gvariant.type -> gvariant

Examples

lib.gvariant.mkEmptyArray usage example

# Creating an empty string array
lib.gvariant.mkEmptyArray (lib.gvariant.type.string)

Noogle detected

Implementation

The following is the current implementation of this function.

mkEmptyArray =
    elemType:
    mkPrimitive (type.arrayOf elemType) [ ]
    // {
      __toString = self: "@${self.type} []";
    };