You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: types.go
    path of file: ./repos/pocketbase/plugins/jsvm/internal/types
    
    the code of the file until where you have to start completion: package main

import (
	"fmt"
	"log"
	"os"
	"path/filepath"
	"reflect"
	"runtime"
	"strings"
	"time"

	"github.com/pocketbase/pocketbase/core"
	"github.com/pocketbase/pocketbase/plugins/jsvm"
	"github.com/pocketbase/pocketbase/tools/list"
	"github.com/pocketbase/tygoja"
)

const heading = `
// -------------------------------------------------------------------
// cronBinds
// -------------------------------------------------------------------

/**
 * CronAdd registers a new cron job.
 *
 * If a cron job with the specified name already exist, it will be
 * replaced with the new one.
 *
 * Example:
 *
 * ` + "```" + `js
 * // prints "Hello world!" on every 30 minutes
 * cronAdd("hello", "*\/30 * * * *", () => {
 *     console.log("Hello world!")
 * })
 * ` + "```" + `
 *
    
func main() {
	declarations := heading + hooksDeclarations()

	gen := tygoja.New(tygoja.Config{
		Packages: map[string][]string{
			"github.com/labstack/echo/v5/middleware":            {"Gzip", "BodyLimit"},
			"github.com/go-ozzo/ozzo-validation/v4":             {"Error"},
			"github.com/pocketbase/dbx":                         {"*"},
			"github.com/pocketbase/pocketbase/tools/security":   {"*"},
			"github.com/pocketbase/pocketbase/tools/filesystem": {"*"},
			"github.com/pocketbase/pocketbase/tools/template":   {"*"},
			"github.com/pocketbase/pocketbase/tokens":           {"*"},
			"github.com/pocketbase/pocketbase/mails":            {"*"},
			"github.com/pocketbase/pocketbase/apis":             {"*"},
			"github.com/pocketbase/pocketbase/forms":            {"*"},
			"github.com/pocketbase/pocketbase":                  {"*"},
			"path/filepath":                                     {"*"},
			"os":                                                {"*"},
			"os/exec":                                           {"Command"},
		},
		FieldNameFormatter: func(s string) string {
			return mapper.FieldName(nil, reflect.StructField{Name: s})
		},
		MethodNameFormatter: func(s string) string {
			return mapper.MethodName(nil, reflect.Method{Name: s})
		},
		TypeMappings: map[string]string{
			"crypto.*":    "any",
			"acme.*":      "any",
			"autocert.*":  "any",
			"driver.*":    "any",
			"reflect.*":   "any",
			"fmt.*":       "any",
			"rand.*":      "any",
			"tls.*":       "any",
			"asn1.*":      "any",
			"pkix.*":      "any",
			"x509.*":      "any",
			"pflag.*":     "any",
			"flag.*":      "any",
			"log.*":       "any",
			"http.Client": "any",
		},
		Indent:               " ", // use only a single space to reduce slight the size
		WithPackageFunctions: true,
		Heading:              declarations,
	})

	result, err := gen.Generate()
	if err != nil {
		log.Fatal(err)
	}

	_, filename, _, ok := runtime.Caller(0)
	if !ok {
		log.Fatal("Failed to get the current docs directory")
	}

	// replace the original app interfaces with their non-"on*"" hooks equivalents
	result = strings.ReplaceAll(result, "core.App", "CoreApp")
	result = strings.ReplaceAll(result, "pocketbase.PocketBase", "PocketBase")
	result = strings.ReplaceAll(result, "ORIGINAL_CORE_APP", "core.App")
	result = strings.ReplaceAll(result, "ORIGINAL_POCKETBASE", "pocketbase.PocketBase")

	// prepend a timestamp with the generation time
	// so that it can be compared without reading the entire file
	result = fmt.Sprintf("// %d\n%s", time.Now().Unix(), result)

	parentDir := filepath.Dir(filename)
	typesFile := filepath.Join(parentDir, "generated", "types.d.ts")

	if err := os.WriteFile(typesFile, []byte(result), 0644); err != nil {
		log.Fatal(err)
	}
}