You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@annotator.apache.org by GitBox <gi...@apache.org> on 2020/04/17 18:01:39 UTC

[GitHub] [incubator-annotator] Treora opened a new pull request #74: Convert code to Typescript

Treora opened a new pull request #74: Convert code to Typescript
URL: https://github.com/apache/incubator-annotator/pull/74
 
 
   Fixes #69 
   
   I split the work in two commits: first set up the configuration changes (while trying not to break if some files remain plain js), then convert the codebase.
   
   I adopted the word ‘matcher’ to distinguish the selector functions from selector objects. We could choose another word like ‘locator’ or whatever if desired. It was just too confusing with one word for both.
   
   I did not try change the code except tiny fixes, but we may want to think again about what types we want to pass around. For CssSelector, we expect a Document, and return an Element. For TextQuoteSelector, we expect either a Node or a Range, and return a Range. I presumed we may be able to have some common type, perhaps a ‘DomScope’ and a ‘DomMatch’, which are used in most places. I made a start towards this (using TextQuoteSelector) but it’s open for discussion.
   
   I did not attempt to update the linting configuration, so that is broken now. But the scripts `build`, `web:start`, `web:build`, and `test` scripts still work, and I added a `typecheck` script.
   
   Suggestions and improvements welcome!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-annotator] Treora merged pull request #74: Convert code to Typescript

Posted by GitBox <gi...@apache.org>.
Treora merged pull request #74:
URL: https://github.com/apache/incubator-annotator/pull/74


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org