Comments (5)
You have to build with TSC 1.18.xx and set target to es2015. For sample look at configuration file
from linq.
Ah! Thanks. I'm afraid that in that case this project is not a good fit for me because I also use other libraries that require a more recent TSC.
from linq.
I assume the same limitation exists for linq-es5. What is the limitation of this library to upgrade to a higher TSC? Is it a practical or a technical one?
from linq.
I thought of a simpler solution: I only load the definition file like /// <reference path="../node_modules/linq-es5/dist/linq.d.ts" />
, assuming that the definition file is less dependent on a specific version of TypeScript. But I don't know how to use it. I don't know how to get the correct type. An example would help me a lot.
My best effort so far:
let fruits = ["apple", "mango", "orange", "passionfruit", "grape"] as Enumerable<string>; // Neither type is assignable to the other.
let result: string = fruits.FirstOrDefault();
alert(result);```
from linq.
You don't need to add reference to the linq-xx.d.ts file. TSC v1.8 compiler will pick its location from the package.json file.
For sample on how to use the library please follow this link: https://tonicdev.com/eniks/using-linq
... or you could locate link on the npmjs package page saying: Try it out: "Test linq-es2015 in your browser." and it will let you execute it in node.
from linq.
Related Issues (20)
- Unexpected token: name (CSharpEnumerator) HOT 16
- GroupBy object key failed. HOT 7
- Left join Faild HOT 5
- An in-range update of typescript is breaking the build 🚨
- OrderBy ThenBy Not work as Expect HOT 3
- F#
- Crash after reusing enumerable HOT 2
- Custom providers or only collections HOT 6
- Concat() element duplicate. HOT 2
- GroupBy typing incorrect HOT 7
- can't call methods on IGrouping HOT 9
- GroupBy overload with result selector has wrong signature.
- TypeError: g.Single is not a function
- SelectMany(). the index of grouped array HOT 3
- Aggregate Bug HOT 4
- Making EnumerableImpl [[call]]able HOT 1
- GroupBy Date Bug? HOT 1
- Missing production files version 2.4.35 HOT 1
- GroupBy doesn't work if key is empty string or null HOT 4
- Sorting using ThenBy or ThenByDescending in a chain is not immutable as in C# HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linq.