Questions tagged [typescript]

Typescript is a language which is a super set of JavaScript

Filter by
Sorted by
Tagged with
2
votes
1answer
599 views

Resource pooling in TypeScript

As an exercise, and in an effort to avoid wrapping callback APIs in every node library it seems, I threw together a resource pool class. The intended usage is the following: ...
13
votes
3answers
2k views

Wrapping IndexDB with RxJs

I find IndexedDB cumbersome and want to wrap the functionality with rxjs observables. I've come up with an angular2 service that seems to fit the bill, but I'm wondering if I'm using the observables ...
4
votes
1answer
2k views

Handling combinations of optional parameters for an Angular filter pipe

This is a simple implementation of an ng2 filter pipe, which can currently take 2 optional facets: <string>status and ...
3
votes
0answers
452 views

Blocking Promise-driven queues with ECMAScript's async/await and generators

I implemented an AsyncQueue, whose dequeue() operation returns a Promise. The ...
3
votes
0answers
88 views

Tic Tac Toe game (Game logic, no UI)

I've implemented a simple class for managing a Tic-Tac-Toe game's logic and state in Typescript. This code is intended to be used by a larger program; it doesn't implement any aspects of a UI. I've ...
2
votes
1answer
502 views

Typescript: Recursion file-system lookup

Previously I asked a question to find the best practice of recursively running a function to retrieve all import/export statements of files in NodeJs here. After some discussion I'm not satisfied yet,...
1
vote
3answers
100 views

Replace array values with product of all other values

Need help to optimize the following code for lower time complexity: ...
0
votes
1answer
66 views

Choosing between 2 Fibonacci alternatives [closed]

Task: Return the fibonacci value at a given index. e.g: input: 6, return: 8. Algorithm 1: ...
-1
votes
1answer
233 views