Comments (6)
Ts file should not be present I agree, I will give it a look
from alfresco-js-api.
Just tested with v4.4.0 and the package types are still broken. Since this is a critical blocking issue, but easy to fix (see #1110), we will republish until there is an official fix.
Update: In case someone else is having typescript errors with v4.4.0, this version has the necessary fix. If you are not having typescript issues, please use the official version.
from alfresco-js-api.
Since the current fix #1113 (removing ts files) is another way of solving #1074, it looks like the changes from #1081 became unnecessary and might be reverted.
Compile-time file resolution should work fine when .js
and .d.ts
files are placed in the same folder, the problem was only when both .ts
, .js
and .d.ts
are in the same folder.
from alfresco-js-api.
@garth to unblock myself, I used the following postinstall
script to remove all .ts
(but not .d.ts
) files:
package.json
"scripts": {
"postinstall": "node tools/js-api-fix.js",
}
tools/js-api-fix.js
const glob = require('glob');
const fs = require('fs');
glob('node_modules/@alfresco/js-api/**/!(*.d).ts', (err, files) => {
if (err) throw err;
console.log(`Fix @alfresco/js-api package issue: https://github.com/Alfresco/alfresco-js-api/issues/1074`);
console.log(`Remove ${files.length} *.ts files from directory configured only for typings`);
files.forEach(file => {
console.log(`remove "${file}"`);
fs.unlinkSync(file);
});
});
Hope it helps
from alfresco-js-api.
@Den-dp, I ran a yarn linked local version for a week or so which was OK for local development, but that was only a very temporary solution. I am now using a variant of 4.4 (linked above) with #1110 PR included. So no need for any post install scripts and all typescript errors are gone.
from alfresco-js-api.
Fixed with the latest builds
from alfresco-js-api.
Related Issues (20)
- Move typings in a separate folder to fix TS compilation
- Use of `any` types makes library almost impossible to use HOT 2
- Running tsc after importing @alfresco/js-api throws 900 errors HOT 8
- Wrong type definition for nodesApi.getNodeContent HOT 1
- Type definition for uploadApi.uploadFile incorrect and not complete
- basic auth without ticket HOT 1
- Extract zip files in Alfresco using js-api HOT 1
- [NodeJs, Ts] misleading type information for type Blob from getNodeContent method HOT 1
- tslib not set as a dependency
- console.log() of error
- Support custom content type on fileUpload HOT 2
- runtime HOT 1
- The FileApi declareRecord method doesn't support parentId parameter
- Property 'webScript' does not exist on type 'AlfrescoApi' HOT 1
- How to get response headers when using callAPI? HOT 1
- Typo in `query` -> `queries` property of RequestFilterQueriesInner class HOT 4
- authPath not work HOT 3
- Issues with array JSON content HOT 2
- getNodeContent throwing error HOT 12
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 alfresco-js-api.