from static method

Creates TriGDecoderOptions from generic RdfDatasetDecoderOptions

This factory method enables proper type conversion when using the generic codec/decoder API with TriG-specific options.

Parameters:

  • options The options object to convert, which may or may not be already a TriGDecoderOptions instance.

Returns:

  • The input as-is if it's already a TriGDecoderOptions instance, or a new instance with default settings otherwise.

Implementation

static TriGDecoderOptions from(RdfGraphDecoderOptions options) =>
    switch (options) {
      TriGDecoderOptions _ => options,
      _ => TriGDecoderOptions(),
    };