# Function UseDataSource

- UseDataSource<Data>(dataSource, name, settings?): ((target, propertyKey) => void)

- #### Type Parameters

  - Data

  #### Parameters

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

  #### Returns ((target, propertyKey) => void)

  - - (target, propertyKey): void

    - #### Parameters

      - target: any
      - propertyKey: string

      #### Returns void

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