Suggestion about `transformers`
See original GitHub issueBetter to support array of transformer creators, not a one factory function.
import * as ts from 'typescript'
interface CustomTransformer {
before?: ts.TransformerFactory<ts.SourceFile> | void
after?: ts.TransformerFactory<ts.SourceFile> | void
}
type TransformerFactoryCreator = (ls: ts.LanguageService) => CustomTransformer
function createTransformers(creators: TransformerFactoryCreator[]): (program: ts.LanguageService) => ts.CustomTransformers {
return (ls: ts.LanguageService) => {
const result = {
before: <ts.TransformerFactory<ts.SourceFile>[]>[],
after: <ts.TransformerFactory<ts.SourceFile>[]>[]
}
for(let creator of creators) {
const factory = creator(ls)
if (factory.before) result.before.push(factory.before)
if (factory.after) result.after.push(factory.after)
}
return result
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
On the Study of Transformers for Query Suggestion
In this article, we study multiple Transformer architectures applied to the query suggestion task and compare them with recurrent neural network (RNN)-based ...
Read more >A Transformer-based recommendation system - Keras
This example demonstrates the Behavior Sequence Transformer (BST) model, by Qiwei Chen et al., using the Movielens dataset. The BST model ...
Read more >Original 13 Transformers Suggestions? - The 2005 Boards
I'd suggest Skullcruncher. Alligorcons have always been associated with Quintessons as well so why not have one of them actually be Quintus ...
Read more >On the Study of Transformers for Query Suggestion
In this paper, we study multiple Transformer architectures applied to the query suggestion task and compare them with RNN-based models.
Read more >Sequential recommendation: A study on transformers, nearest ...
A number of machine learning models were proposed recently for the task of sequential recommendation, with the latest ones based on deep learning...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, last commit works
In 0.14.0 now