# Libraries

The [Core WireBootstrap library](https://docs.wirebootstrap.com/wirebootstrap/key-concepts) as well as all [components](https://docs.wirebootstrap.com/components) and related files are normally retrieved from the NPM registry and stored in the `node_modules` folder off the root of the theme project.

## Theme Libraries

Component libraries, TypeScript definition files, and other related files specific to a theme are located off the root of a theme project in the `\libs` directory.

## Types

To be sure all WireBootstrap Typescript declaration files can be found by a project's compiler, the path to the`@wirebootstrap` scope root directory is registered in the `compilerOptions.typeRoots` attribute inside the project's `tsconfig.json` file.&#x20;

```json
{
  "compilerOptions": {
    ...
    "typeRoots": [
      "./node_modules/@wirebootstrap", 
      "./node_modules/@types"
    ]
  }
}
```

When a custom `typeRoots` is specified, be sure to replace the original default that points to the `@types` directory as seen above.

## Wire

All Web components and services published by WireBootstrap are created off of the global `wire` JavaScript object located in the core WireBootstrap library `wire.js`.  Many create a sub namespace and then adds classes, interfaces, and other structures to support a given component or service.  This is similar in design to how all jQuery plugins attach to the root `jQuery` object.

The example below creates a new [WireBootstrap DataTable](https://docs.wirebootstrap.com/wirebootstrap/reference/wire.data/wire.data.datatable) and binds it to an instance of the Bootstrap Select component.

```javascript
const table = new wire.data.DataTable(...);

const select = new wire.bsSelect().render({
    data: table
    ...
});
```

## IWire

In TypeScript, all root types, classes, interfaces, and other structures native to the core WireBootstrap JavaScript API begin with `IWire`.

The following example casts a raw JavaScript object into a WireBootstrap data table by referencing the `IWireDataTable` interface.

```javascript
const data: any = { ... };

const table = data as IWireDataTable;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wirebootstrap.com/wirebootstrap/working-with-themes/libraries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
