github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/plain-object-disable-defaults/nodejs/index.ts (about)

     1  // *** WARNING: this file was generated by test. ***
     2  // *** Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  import * as pulumi from "@pulumi/pulumi";
     5  import * as utilities from "./utilities";
     6  
     7  // Export members:
     8  export { FooArgs } from "./foo";
     9  export type Foo = import("./foo").Foo;
    10  export const Foo: typeof import("./foo").Foo = null as any;
    11  utilities.lazyLoad(exports, ["Foo"], () => require("./foo"));
    12  
    13  export { FuncWithAllOptionalInputsArgs, FuncWithAllOptionalInputsResult, FuncWithAllOptionalInputsOutputArgs } from "./funcWithAllOptionalInputs";
    14  export const funcWithAllOptionalInputs: typeof import("./funcWithAllOptionalInputs").funcWithAllOptionalInputs = null as any;
    15  export const funcWithAllOptionalInputsOutput: typeof import("./funcWithAllOptionalInputs").funcWithAllOptionalInputsOutput = null as any;
    16  utilities.lazyLoad(exports, ["funcWithAllOptionalInputs","funcWithAllOptionalInputsOutput"], () => require("./funcWithAllOptionalInputs"));
    17  
    18  export { ModuleTestArgs } from "./moduleTest";
    19  export type ModuleTest = import("./moduleTest").ModuleTest;
    20  export const ModuleTest: typeof import("./moduleTest").ModuleTest = null as any;
    21  utilities.lazyLoad(exports, ["ModuleTest"], () => require("./moduleTest"));
    22  
    23  export { ProviderArgs } from "./provider";
    24  export type Provider = import("./provider").Provider;
    25  export const Provider: typeof import("./provider").Provider = null as any;
    26  utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
    27  
    28  
    29  // Export sub-modules:
    30  import * as types from "./types";
    31  
    32  export {
    33      types,
    34  };
    35  
    36  const _module = {
    37      version: utilities.getVersion(),
    38      construct: (name: string, type: string, urn: string): pulumi.Resource => {
    39          switch (type) {
    40              case "example:index:Foo":
    41                  return new Foo(name, <any>undefined, { urn })
    42              case "example:index:moduleTest":
    43                  return new ModuleTest(name, <any>undefined, { urn })
    44              default:
    45                  throw new Error(`unknown resource type ${type}`);
    46          }
    47      },
    48  };
    49  pulumi.runtime.registerResourceModule("example", "index", _module)
    50  pulumi.runtime.registerResourcePackage("example", {
    51      version: utilities.getVersion(),
    52      constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => {
    53          if (type !== "pulumi:providers:example") {
    54              throw new Error(`unknown provider type ${type}`);
    55          }
    56          return new Provider(name, <any>undefined, { urn });
    57      },
    58  });