A typescript library to help generate odata queries

Usage no npm install needed!

<script type="module">
  import tsOdataV4 from 'https://cdn.skypack.dev/ts-odata-v4';


Build npm version



All notable changes to this project will be documented in this file. ts-odata-v4 is forked ts-odata project.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.1.2] - 2018-10-25


  • Support for $search

[0.1.1] - 2018-10-20


  • Support date input

[0.1.0] - 2018-10-16


  • Support for OData 'Count' keyword

A typescript library to help generate odata queries

This is a Typescript port of the javascript library [joData]: https://github.com/mccow002/joData

tsoData creates a javascript object that represents an oData query. This allows you to easily modify parts of your oData query without effecting the rest of it.

tsoData's goal is to implement

All methods in tsoData are chainable.

Getting Started

Creating a TsoData object

To create a TsoData query object, you instantiate it by passing your base uri into the constructor.

var query = new Tso('http://test.com');
var query = new Tso('http://test.com');


The base uri passed in through the constructor can be accessed by calling



To get the query in oData format, call toString off of your query object.


All further documentation is in the library definitions

Unsupported Features (for now)

These are the list of features TsoData currently does not support. Hopefully, these features are coming soon.


Type Functions

  • IsOf

Custom Query Options

TsoData currently does not support any custom query options