Comments (8)
I'm no expert on TypeScript typings, so I can't really say for sure what the fix is.
@septs Can you have a look at this?
from pofile.
@mrjpierce first, this package not is esmodule
The as designed,
Line 402 in 8bd7810
@rubenv the issue require use esmodule written this package
WARNING: This needs to break the API backwards compatibility
see https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require
from pofile.
About get PO.Item
instance type, please use the workaround code
type Item = InstanceType<typeof PO["Item"]>
See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#conditional-types
from pofile.
type Item = typeof PO["Item"]["prototype"];
This seems to work for now ๐. Xiรจxiรจ
from pofile.
@rubenv The issue closable
from pofile.
@septs thanks!
from pofile.
@rubenv I want to rewrite this codebase using TypeScript.
from pofile.
@septs Could you elaborate a bit on why and how you'd want to do this?
Keep in mind that this is a project I consider "finished": no big new functionality is needed (it does what it needs to do) and we can't break API / backwards compatibilty.
Rewrites are always risky. I'm all for strongly typing things, but it can only be done incrementally and in an extremely careful way: no user should ever see their code break.
from pofile.
Related Issues (14)
- Update documentation
- More than one references in a line HOT 4
- Empty line causes failure to read header HOT 3
- po.js errors out with latest version HOT 7
- Port escaping fixes HOT 1
- msgctxt spanning more than one line is not captured HOT 2
- pofile misparses po files with "Mac" linebreaks
- Add support webpack for work in browser HOT 2
- TypeScript issues
- Assign translated values
- `obsolete` is marked as private HOT 3
- PO.Item.toString() doesn't include translator comments
- #| msgid not parsed (previous-untranslated-string)
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 pofile.