158 questions
0
votes
0
answers
83
views
How to preserve auto-completion and avoid namespace in TypeScript Files which exports functions
I'm currently working on a project where I have a lot of files like that, exporting functions like this:
// file: myFunctions.ts
// Function 1
export function add(a: number, b: number): number {
...
0
votes
0
answers
132
views
Javascript with namespace in R Shiny
Does any one know how to put Javascript with namespace in R Shiny?
I create a Shiny module to add draggable text to Sankey plot, right click at the text will give an option to remove it from the plot. ...
1
vote
0
answers
61
views
Namespace RequireJS in JS API to avoid conflicts with 3rd party AMD libraries
I want to include jquery and jquery UI along with requirejs( at top of the header ).
with WordPress starting to utillize dynamic module loading and React, primarily in its administrative dashboard and ...
1
vote
2
answers
247
views
Calling google.script.run with Namespace Functions [duplicate]
I've been migrating an old javascript project to GAS and am hitting a blocker on trying to run namespace functions from the client-side web app. Quick code example:
var foo = function() {
function ...
1
vote
0
answers
33
views
Using namespaced functions in jQuery.fn
This seems like it should be obvious, but I can not figure out how to properly use namespaced (dotted) function names in jQuery.fn.
More precisely, using this in a function embedded in an object ...
1
vote
0
answers
4k
views
Cannot find namespace - ts(2503) [Exporting a namespace]
I am trying to export mongoose.Types in two different ways so that I can access it in another file to create interfaces or types. Why does 1 approach work and the other one doesn't? E.g
❌ This doesn't ...
0
votes
0
answers
618
views
Insert new interface method namespace Typescript
I am working with a third-party library that has a namespace thisLibrary and within that namespace has an interface Options. I would like to add a property to the Options interface and then use the ...
3
votes
2
answers
461
views
How to best emulate namespaces in Typescript?
I realize that namespaces are essentially deprecated in ES6 and don't work well in Visual Code.
But I still want to use them. Why? Because I have code spread across multiple files that I want to group ...
0
votes
1
answer
93
views
double namespaced routing issues with fetch
Hello> Im creating a Javascript SPA/Rails Api that has books and users. I using namespace in my routes,along with serializers for each model. Im not sure why im getting this error when trying to do ...
0
votes
1
answer
2k
views
export namespace in namespace
Can I export a namespace A with another namespace B in it? Something like:
// b.ts
export namespace B {
export const val = 'val';
}
// a.ts
export namespace A {
//... some thing import b as ...
0
votes
0
answers
145
views
Added click event to span tag and its getting called twice from namespace
I do have a span tag that I added a click event to and it gets called twice even though I only click it once and I have no idea why. If I run this code in a separate project then the button only gets ...
0
votes
2
answers
110
views
Accessing a JavaScript variable from a namespace at a "global" level on the same page
I'm trying to access a variable from a namespace on the same page at a "global" level but thus far have been unable to do so. Here's the code:
window.addEventListener('resize',
() => ...
-1
votes
1
answer
318
views
Nested functions error, Unexpected token ':', Cannot read property of undefined
I want to make my code more clear, that the reason i am trying to learn namespaces or nested functions. I've read about them in several places and as i understood 'Revealing Module' is the best option....
0
votes
0
answers
204
views
How would I export imported namespaces which were generated in typescript?
My project is a microservices project which generates some typescript from .proto files (not relevant). I'd like to create a local npm package that exports what's in these files, in addition to some ...
44
votes
6
answers
54k
views
How to turn on the 'throwIfNamespace' flag in React.js
I have some code like below in my component.
<svg id="SvgjsSvg3254" width="318" height="152" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:...