类型 'Observable<ArrayBuffer>' 不可分配给类型 'Observable<Date[]>'

Type 'Observable<ArrayBuffer>' is not assignable to type 'Observable<Date[]>'

  consultar ( opcion: string, articulo: Articulo ): Observable<Date[]> {
    return this.http.get<Date[]>( this.rootUrl + "consultar?opcion=" + opcion, articulo );
  }

问题:类型 'Observable' 无法分配给类型 'Observable<Date[]>'。 类型 'ArrayBuffer' 缺少类型 'Date[]' 的以下属性:length、pop、push、concat 和另外 27 个。

get 中的第二个参数应该是选项,但您可能正在向它传递数据。

Angular docs - get method

Constructs a GET request that interprets the body as an ArrayBuffer and returns the response in an ArrayBuffer.