# Function UseDataSource

- UseDataSource<Data>(
  dataSource: IdOrInstanceOrToken<
  BaseDataSource<Data, BaseDataSourceMetadata, BaseDataSourceViewer<any>>,
  >,
  name: string,
  settings?: UseDataSourceSettings<any, any>,
  ): (target: any, propertyKey: string) => void

  #### Type Parameters

  - Data

  #### Parameters

  - dataSource: IdOrInstanceOrToken<
    BaseDataSource<Data, BaseDataSourceMetadata, BaseDataSourceViewer<any>>,
    >
  - name: string
  - `Optional` settings: UseDataSourceSettings<any, any>

  #### Returns (target: any, propertyKey: string) => void

  - Defined in packages/angular/form-system/src/lib/decorators/use-data-source.ts:20