DartWitGeneratorWorld constructor

DartWitGeneratorWorld({
  1. required DartWitGeneratorWorldImports imports,
  2. required WasmLibrary library,
})

Implementation

DartWitGeneratorWorld({
  required this.imports,
  required this.library,
})  : _generate = library.getComponentFunction(
        'generate',
        const FuncType([('config', WitGeneratorConfig._spec)],
            [('', ResultType(WitFile._spec, StringType()))]),
      )!,
      _generateToFile = library.getComponentFunction(
        'generate-to-file',
        const FuncType([
          ('config', WitGeneratorConfig._spec),
          ('file-path', StringType())
        ], [
          ('', ResultType(null, StringType()))
        ]),
      )!;