static Future create()

in functions_framework_builder/lib/src/supported_function_type.dart [40:64]


  static Future<SupportedFunctionType> create(
    Resolver resolver,
    String libraryUri,
    String typeDefName,
    String constructor,
  ) async {
    final lib = await resolver.libraryFor(
      AssetId.resolve(Uri.parse(libraryUri)),
    );

    final handlerTypeAlias =
        lib.exportNamespace.get(typeDefName) as TypeAliasElement;

    final functionType = handlerTypeAlias.instantiate(
      typeArguments: [],
      nullabilitySuffix: NullabilitySuffix.none,
    );

    return SupportedFunctionType._(
      libraryUri,
      typeDefName,
      functionType as FunctionType,
      constructor: constructor,
    );
  }