Comments (2)
I wanted to generate the following:
declare namespace DemoName {
interface IDemo {
getMe(name: "name"): string;
getMe(name: "type"): string;
getMe(name: "id"): string;
}
}
from dts-dom.
Nevermind. I think I found it; have to use "stringLiteral".
This is a very neat library. Thanks a ton.
For anyone looking for this example below is what I have
dom.create.method("getThing", [dom.create.parameter("x", dom.type.stringLiteral("your literal text"))], dom.type.void, dom.DeclarationFlags.Optional);
from dts-dom.
Related Issues (20)
- Release 0.0.15 HOT 2
- writeDeclartion doesn't handle methods HOT 3
- [bug] optional parameter of the interface's method HOT 2
- Class member function vs method HOT 2
- multiple types for members/parameters etc HOT 2
- Acknowledge contributors HOT 1
- Testing HOT 1
- references between different namespaces HOT 2
- how to generate an `type` declare. HOT 1
- How to return a typed Promise from a method HOT 3
- Parameters with default value HOT 1
- accessor support?
- Namespaces can contain enums
- Thank you for including /lib in your npm packages! HOT 1
- Type alias NamespaceMember should include EnumDeclaration HOT 3
- Including unescaped code
- published package is missing functions
- Missing `unknown` type
- SPACE missing in function writeInterface() before keyword extends
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 dts-dom.