> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# hasConfig

> Check whether any configuration data is loaded (file or object).

[ref-getfilepath]: /docs/server-sdks/reference/typescript/agents/configuration/config-loader/get-file-path

Check whether any configuration data has been loaded. Returns `true` if a file
was loaded or data was set via `loadFromObject()`.

<Note>
  **Deliberate deviation from the Python SDK.** Python's `has_config()` returns
  `True` only when a *file* was loaded. The TypeScript version also returns
  `true` for object-loaded data, because `loadFromObject()` is a TS-only entry
  point with no Python equivalent -- treating object-loaded data as "configured"
  matches the TS API surface.

  If you specifically need file-load detection, check
  `loader.getFilePath() !== null` via
  [`getFilePath()`][ref-getfilepath].
</Note>

## **Returns**

`boolean` -- `true` if any configuration data exists (from file or object),
`false` if the loader is empty.

## **Example**

```typescript {4}
import { ConfigLoader } from '@signalwire/sdk';

const loader = new ConfigLoader('config.json');
if (loader.hasConfig()) {
  console.log('Config loaded, proceed with startup');
}
```