Comments (3)
Hi @dudi44,
Thanks for posting the question.
@types/*
namespace belongs to DefinitelyTyped project. It's a collection of types declaration for different popular JavaScript libraries the authors of which do not provide typings on they own. Such typings are supported with the community fellows and the declarations are usually outdated, as any changes to a library require updating and publishing typings definitions.
Libraries created using TypeScript, on the other hand, usually include types declarations together with the package itself and are always up to date.
sp-rest-proxy
is written in TypeScript. But, in the early days, it was in ES6 and used module.exports
which was kept for backward compatibility then migrating to TypeScript. So there is a small nuance using typings - import should be from sp-rest-proxy/dist/RestProxy
to include typings:
import RestProxy, { IProxySettings } from 'sp-rest-proxy/dist/RestProxy';
const settings: IProxySettings = {
configPath: './config/private.json'
};
const restProxy = new RestProxy(settings);
restProxy.serve();
from sp-rest-proxy.
Added a section in README.md.
from sp-rest-proxy.
Hi @koltyakov,
Thank you for very quick response!
The above workaround works fine. However I needed also run npm i @types/express --save as
Could not find a declaration file for module 'express'. in .../node_modules/sp-rest-proxy/dist/interfaces/index.d.ts
so closing the issue
from sp-rest-proxy.
Related Issues (20)
- OData parser to support clients relying on metadata URLs HOT 3
- Cannot find module 'socket.io-client' error when updating from version 3.0.2 to 3.1.0 HOT 1
- Request Method DELETE HOT 8
- OndemandCredentials Electron Mac HOT 6
- Identical requests - succeeding and failing HOT 4
- Can this react app be deployed as a web app on to a windows server so that users can access the app outside of the server ? HOT 6
- Host "sp-rest-proxy" as an independent web-app on Azure or pass authentication in configs to be used in CI/CD pipeline HOT 1
- Can this proxy be used when the host SP environment (on prem) has a "strict-origin-when-cross-origin" HTTP referrer policy? HOT 3
- sharepoint MFA bypass HOT 2
- [Feature query] Can the proxy be made to connect to multiple sites? HOT 1
- sp-rest-proxy with sharepointplus HOT 10
- POST request fails when calling the proxy (adding extra path to sharepoint request) HOT 5
- Proxy Error: Cannot read properties of null (reading 'toString') (see more in sp-rest-proxy console) HOT 4
- Version 3.3.4 broken for OnpremiseUserCredentials HOT 5
- Cannot read properties of null (reading 'toString') HOT 3
- On Demand - cannot read properties of null / childprocess.spawnsync EONENT Error HOT 2
- Proxy approach for Azure Active Directory HOT 2
- Typescript import HOT 1
- Setting siteUrl programatically HOT 4
- sp-rest-proxy does not work with Node 18.16.0 (current LTS) HOT 5
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 sp-rest-proxy.