This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
SCRIPT_DIR=${BASH_SOURCE[0]%/*} | |
# load our module system: | |
source "${SCRIPT_DIR}/module.sh" | |
# below command imports module ./greeter.sh and run its 'greet' function with the following arguments: | |
module greeter greet tterranigma | |
module greeter greet niieani |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./component"></require> | |
<input type="checkbox" ref="isFiltering"> | |
<br> | |
<component | |
optimized-repeat.for="id of components | without8: isFiltering.checked" | |
text.bind="id"> | |
[${$index}] | |
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type HasProperty<X, P> = (X[keyof X & P] extends P ? true : false) extends false ? true : false | |
type example = HasProperty<{type:1}, 'type'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { default: reporter } = require.requireActual( | |
"jest-jasmine2/build/reporter" | |
); | |
function runSuite(suite, parentSuite) { | |
const topSuite = jasmine.getEnv().topSuite(); | |
const { children, id, result } = topSuite; | |
// setting this suite to disabled will not cause jest to | |
// clearResourcesForRunnable for this suite's ID | |
suite.disabled = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
// let's ensure we require the right instance of webpack (when package is linked): | |
const require = module.parent && module.parent.parent && module.parent.parent.require | |
? module.parent.parent.require.bind(module.parent.parent) | |
: module.require | |
export type DebuggerType = (context : string, meta : Object) => void | |
const ImportDependency = require('webpack/lib/dependencies/ImportDependency') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./example"></require> | |
<binding-intercept-example if.bind="show"></binding-intercept-example> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./example"></require> | |
<binding-intercept-example if.bind="show"></binding-intercept-example> | |
</template> |
[Live version Playground](https://www.typescriptlang.org/play/#src=%2F%2F%20actual%20type%3A%0D%0Atype%20HasProperty%3C%0D%0A%20%20T%2C%0D%0A%20%20Property%2C%0D%0A%20%20MappedT%20%3D%20AllDefinedAsTrue%3CT%3E%20%26%20AllUndefinedAsFalse%20%26%20Padding%2C%0D%0A%3E%20%3D%20MappedT%5Bkeyof%20MappedT%20%26%20Property%5D%3B%0D%0A%0D%0A%2F%2F%20usage%3A%0D%0Atype%20TrueExample%20%3D%20HasProperty%3C%7Babc%3A%20number%7D%2C%20'abc'%3E%3B%0D%0Atype%20TrueExample2%20%3D%20HasProperty%3C%7Babc%3A%20number%2C%20def%3A%20number%7D%2C%20'def'%3E%3B%0D%0Atype%20FalseExample%20%3D%20HasProperty%3C%7B%7D%2C%20'abc'%3E%3B%0D%0Atype%20FalseExample2%20%3D%20HasProperty%3C%7Bxyz%3A%20number%7D%2C%20'abc'%3E%3B%0D%0Atype%20TrueExample3%20%3D%20HasProperty%3CFunction%2C%20'apply'%3E%3B%0D%0A%0D%0Aconst%20ex1%3A%20TrueExample%20%3D%20'1'%3B%0D%0Aconst%20ex2%3A%20TrueExample2%20%3D%20'1'%3B%0D%0Aconst%20ex3%3A%20FalseExample%20%3D%20'0'%3B%0D%0Aconst%20ex4%3A%20FalseExample2%20%3D%20'0'%3B%0D%0Aconst%20ex5%3A%20TrueExample3%20%3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-param-reassign */ | |
/* | |
You should inline the chunk that this outputs into your HTML | |
then execute window.onReady() when all chunks are loaded, e.g. | |
<script async onload="executeWhenAllChunksLoaded()" src="..."> | |
where 'executeWhenAllChunksLoaded' runs 'onReady()' once all chunks have loaded | |
You may use HtmlWebpackPlugin in combination with ScriptExtHtmlWebpackPlugin to do the inlining. | |
*/ |