dgreene1 / environment-enforcer Goto Github PK
View Code? Open in Web Editor NEWWhen you want your code to work in every environment, call on the Environment Enforcer.
License: MIT License
When you want your code to work in every environment, call on the Environment Enforcer.
License: MIT License
No one likes unhandled errors, but if we return errors that act as documentation... then we can be clear about this library’s current limitations and/or design goals. For instance...
Limitations:
Design Goals (to list a few that might be controversial and need to explaining):
After integrating environment-enforcer into my repo, I'm seeing typeParameters
is not coming through here resulting in the following error:
This macro requires you to explicitly pass the type parameter for the interface that defines the contract for which each environment variable file must adhere to. However, we did not find a type parameter for this node: {"type":"CallExpression","callee":{"type":"Identifier","name":"cov_78iegp7dg"},"arguments":[]}"
As you can see, p.node
(logged above) has no typeParameters
prop.
In the unit tests in this repo, I see that p.node
is:
{
type: 'CallExpression',
start: 136,
end: 173,
loc: SourceLocation {
start: Position { line: 7, column: 23 },
end: Position { line: 7, column: 60 },
filename: undefined,
identifierName: undefined
},
range: undefined,
leadingComments: undefined,
trailingComments: undefined,
innerComments: undefined,
extra: undefined,
callee: Node {
type: 'MemberExpression',
start: 136,
end: 161,
loc: SourceLocation {
start: [Position],
end: [Position],
filename: undefined,
identifierName: undefined
},
range: undefined,
leadingComments: undefined,
trailingComments: undefined,
innerComments: undefined,
extra: undefined,
object: Node {
type: 'Identifier',
start: 136,
end: 155,
loc: [SourceLocation],
range: undefined,
leadingComments: undefined,
trailingComments: undefined,
innerComments: undefined,
extra: undefined,
name: 'EnvironmentEnforcer'
},
computed: false,
property: Node {
type: 'Identifier',
start: 156,
end: 161,
loc: [SourceLocation],
range: undefined,
leadingComments: undefined,
trailingComments: undefined,
innerComments: undefined,
extra: undefined,
name: 'parse'
}
},
arguments: [],
typeParameters: Node {
type: 'TSTypeParameterInstantiation',
start: 161,
end: 171,
loc: SourceLocation {
start: [Position],
end: [Position],
filename: undefined,
identifierName: undefined
},
range: undefined,
leadingComments: undefined,
trailingComments: undefined,
innerComments: undefined,
extra: undefined,
params: [ [Node] ]
}
}
I'm unclear why typeParameters are not being passed through successfully.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.