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: type_loader.rb
    path of file: ./repos/rbvmomi/lib/rbvmomi
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# Copyright (c) 2011-2017 VMware, Inc.  All Rights Reserved.
# SPDX-License-Identifier: MIT

require 'set'
require 'monitor'

module RbVmomi

  class TypeLoader
    def initialize fn, extension_dirs, namespace
      @extension_dirs = extension_dirs
      @namespace = namespace
      @lock = Monit
    
    def initialize fn, extension_dirs, namespace
      @extension_dirs = extension_dirs
      @namespace = namespace
      @lock = Monitor.new
      @db = {}
      @id2wsdl = {}
      @loaded = {}
      add_types Hash[BasicTypes::BUILTIN.map { |k| [k, nil] }]
      vmodl_database = File.open(fn, 'r') { |io| Marshal.load io }
      vmodl_database.reject! { |k, v| k =~ /^_/ }
      add_types vmodl_database
      preload
    end