type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(host, value) => value | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
(host, value) => {
host.mandala.forEach((m) => m.template = [...host.template])
dispatch(host, 'change', {detail: {
template: [...host.template]
}, bubbles: true})
} | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
(m) => m.template = [...host.template] | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
(host) => (fn) => host.state = fn(host.state) | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
(fn) => host.state = fn(host.state) | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
({state}) => state.layers[state.active] | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
({state: {layers}}) => arrChain([...layers]) | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
({state, activeLayer, styleToggle, mandalaStyles}) => html`
<div>
<section class="editor">
<div class="preview">
<nav>
<small class="c-active">Layer: ${state.active}</small>
</nav>
<mandala-polygon n="${activeLayer[0]}" r="${activeLayer[1]}" vr="${activeLayer[2]}" d="${state.active}" />
... | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
(l, i) => html`
<div class="layer ${state.active === i ? 'active' : ''}" tabindex="${i}" data-layer="${i}" onclick="${setActiveLayer}">
${l.map((v, idx) => html`
<input type="number" size="5" min="1" step="1" value="${v}" data-layer="${i}"
onfocus="${setActiveLayer}"
onchange="${... | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
(v, idx) => html`
<input type="number" size="5" min="1" step="1" value="${v}" data-layer="${i}"
onfocus="${setActiveLayer}"
onchange="${(host, e) => setLayerValue(host, e, idx)}"/>
` | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
(host, e) => setLayerValue(host, e, idx) | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
(host) => deleteLayer(host, i) | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
InterfaceDeclaration |
interface MandalaCompanion extends HTMLElement {
type: string
[key: string]: any
} | auzmartist/mandala | src/components/mandala-companion.ts | TypeScript |
ArrowFunction |
value => {
this.setState({ inputValue: value });
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
value => {
this.setState({ inputPlaceHolder: value });
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
if (this.inputRef && this.inputRef.current) {
// TODO: check the reason
(this.inputRef.current as any).focus();
}
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
cb => {
const clickOutsideHandler = (e: Event) => {
const optionInstance = this.optionsRef && this.optionsRef.current;
const triggerDom = this.triggerRef && this.triggerRef.current;
const optionsDom = ReactDOM.findDOMNode(optionInstance);
... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(e: Event) => {
const optionInstance = this.optionsRef && this.optionsRef.current;
const triggerDom = this.triggerRef && this.triggerRef.current;
const optionsDom = ReactDOM.findDOMNode(optionInstance);
const target = e.target as Element;
... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
document.removeEventListener('mousedown', this.clickOutsideHandler, false);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
let { rePosKey } = this.state;
rePosKey = rePosKey + 1;
this.setState({ rePosKey });
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
states => {
this.setState({ ...states } as CascaderState);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
this.setState({ isOpen: true });
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
cb => {
this.setState({ isOpen: false }, () => {
cb && cb();
});
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
cb && cb();
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
selectedKeys => this.setState({ selectedKeys }) | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
value => {
this.props.onChange && this.props.onChange(value);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
selected => {
this.props.onSelect && this.props.onSelect(selected);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
input => {
this.props.onSearch && this.props.onSearch(input);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(...v) => {
this.props.onFocus && this.props.onFocus(...v);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(...v) => {
this.props.onBlur && this.props.onBlur(...v);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
visible => {
this.props.onDropdownVisibleChange(visible);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
bool => {
this.setState({ isHovering: bool });
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(selectedOpt, callback) => {
const { loadData } = this.props;
if (loadData) {
new Promise<void>(resolve => {
loadData(selectedOpt).then(() => {
callback();
this.setState({ loading: false ... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
resolve => {
loadData(selectedOpt).then(() => {
callback();
this.setState({ loading: false });
resolve();
});
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
callback();
this.setState({ loading: false });
resolve();
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(newLoadedKeys, data) => {
const { onLoad } = this.props;
onLoad && onLoad(newLoadedKeys, data);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(e, { panelIndex, activeNode }) => {
this.props.onListScroll(e, { panelIndex, activeNode });
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
data => this.props.onExceed(data) | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => this.props.onClear() | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(name: string) => {
const firstInProps = isEmpty(prevProps) && name in props;
const nameHasChange = prevProps && !isEqual(prevProps[name], props[name]);
return firstInProps || nameHasChange;
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const firstInProps = !prevProps && 'treeData' in props;
const treeDataHasChange = prevProps && prevProps.treeData !== props.treeData;
return firstInProps || treeDataHasChange;
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(valueItem: SimpleValueType[]) => {
const formatItem: (string | number)[] = onChangeWithObject ?
(valueItem as CascaderData[]).map(i => i.value) :
valueItem as (string | number)[];
formatValuePath.push(formatItem);
... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
i => i.value | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
v => {
const formatKeyItem = findKeysForValues(v, keyEntities);
!isEmpty(formatKeyItem) && formatKeys.push(formatKeyItem);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(value: string) => {
this.foundation.handleInputChange(value);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(e: any, tagValuePath: Array<string | number>) => {
this.foundation.handleTagRemove(e, tagValuePath);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(value: string | Array<string>, idx: number, type: string) => {
const { keyEntities, disabledKeys } = this.state;
const { size, disabled, displayProp, displayRender, disableStrictly } = this.props;
const nodeKey = type === strings.IS_VALUE ?
findKeysForValues(value, keyEntities)[0] ... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
checkedKey => {
if (!isEmpty(keyEntities[checkedKey])) {
tagValue.push(keyEntities[checkedKey].valuePath);
}
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(e: MouseEvent, item: Entity | Data) => {
this.foundation.handleItemClick(e, item);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(e: MouseEvent, item: Entity) => {
this.foundation.handleItemHover(e, item);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(item: Entity | Data) => {
this.foundation.onItemCheckboxClick(item);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(e: React.UIEvent<HTMLUListElement, UIEvent>, ind: number) => {
this.foundation.handleListScroll(e, ind);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const {
inputValue,
isSearching,
activeKeys,
selectedKeys,
checkedKeys,
halfCheckedKeys,
loadedKeys,
loadingKeys
} = this.state;
const {
filterTreeNode,
dropdownClassN... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(hiddenTag: Array<ReactNode>) => {
const { disabled, showRestTagsPopover, restTagsPopoverProps } = this.props;
const plusNCls = cls(`${prefixcls}-selection-n`, {
[`${prefixcls}-selection-n-disabled`]: disabled
});
const renderPlusNChildren = (
<span className={pl... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const { autoMergeValue, maxTagCount } = this.props;
const { checkedKeys, resolvedCheckedKeys } = this.state;
const realKeys = this.mergeType === strings.NONE_MERGE_TYPE
? checkedKeys
: resolvedCheckedKeys;
const displayTag: Array<ReactNode> = [];
... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(checkedKey, idx) => {
const notExceedMaxTagCount = !isNumber(maxTagCount) || maxTagCount >= idx + 1;
const item = this.renderTagItem(checkedKey, idx, strings.IS_KEY);
if (notExceedMaxTagCount) {
displayTag.push(item);
} else {
hiddenTag.p... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const { placeholder, filterTreeNode, multiple } = this.props;
const { selectedKeys, checkedKeys } = this.state;
const searchable = Boolean(filterTreeNode);
if (!searchable) {
if (multiple) {
if (isEmpty(checkedKeys)) {
return <span... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const { suffix }: any = this.props;
const suffixWrapperCls = cls({
[`${prefixcls}-suffix`]: true,
[`${prefixcls}-suffix-text`]: suffix && isString(suffix),
[`${prefixcls}-suffix-icon`]: isSemiIcon(suffix),
});
return <div className={suffixWrap... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const { prefix, insetLabel } = this.props;
const labelNode: any = prefix || insetLabel;
const prefixWrapperCls = cls({
[`${prefixcls}-prefix`]: true,
// to be doublechecked
[`${prefixcls}-inset-label`]: insetLabel,
[`${prefixcls}-prefix-t... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const { disabled, triggerRender, multiple } = this.props;
const { selectedKeys, inputValue, inputPlaceHolder, resolvedCheckedKeys, checkedKeys } = this.state;
let realValue;
if (multiple) {
if (this.mergeType === strings.NONE_MERGE_TYPE) {
realValue =... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
this.foundation.toggleHoverState(true);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
this.foundation.toggleHoverState(false);
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
(e: MouseEvent) => {
e && e.stopPropagation();
this.foundation.handleClear();
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const { showClear, disabled, multiple } = this.props;
const { selectedKeys, isOpen, isHovering, checkedKeys } = this.state;
const hasValue = selectedKeys.size;
const multipleWithHaveValue = multiple && checkedKeys.size;
return showClear && (hasValue || multipleWithHaveVa... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const clearCls = cls(`${prefixcls}-clearbtn`);
const allowClear = this.showClearBtn();
if (allowClear) {
return (
<div className={clearCls} onClick={this.handleClear}>
<IconClear />
</div>
);
}
r... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const { arrowIcon } = this.props;
const showClearBtn = this.showClearBtn();
if (showClearBtn) {
return null;
}
return arrowIcon ? <div className={cls(`${prefixcls}-arrow`)}>{arrowIcon}</div> : null;
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => {
const {
disabled,
multiple,
filterTreeNode,
style,
size,
className,
validateStatus,
prefix,
suffix,
insetLabel,
triggerRender,
showClear,
} = this.prop... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => this.handleMouseOver() | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
ArrowFunction |
() => this.handleMouseLeave() | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
InterfaceDeclaration |
export interface ScrollPanelProps extends BasicScrollPanelProps {
activeNode: CascaderData;
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
InterfaceDeclaration |
export interface TriggerRenderProps extends BasicTriggerRenderProps {
componentProps: CascaderProps;
onClear: (e: React.MouseEvent) => void;
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
InterfaceDeclaration |
export interface CascaderProps extends BasicCascaderProps {
arrowIcon?: ReactNode;
defaultValue?: Value;
dropdownStyle?: CSSProperties;
emptyContent?: ReactNode;
motion?: Motion;
treeData?: Array<CascaderData>;
restTagsPopoverProps?: PopoverProps;
children?: ReactNode;
value?: Value... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
InterfaceDeclaration |
export interface CascaderState extends BasicCascaderInnerData {
keyEntities: Entities;
prevProps: CascaderProps;
treeData?: Array<CascaderData>;
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
TypeAliasDeclaration | /* The basic type of the value of Cascader */
export type SimpleValueType = string | number | CascaderData; | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
TypeAliasDeclaration | /* The value of Cascader */
export type Value = SimpleValueType | Array<SimpleValueType> | Array<Array<SimpleValueType>>; | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
MethodDeclaration |
static getDerivedStateFromProps(props: CascaderProps, prevState: CascaderState) {
const {
multiple,
value,
defaultValue,
onChangeWithObject,
leafOnly,
autoMergeValue,
} = props;
const { prevProps } = prevState;
let ... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
MethodDeclaration |
componentDidMount() {
this.foundation.init();
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
MethodDeclaration |
componentWillUnmount() {
this.foundation.destroy();
} | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
MethodDeclaration |
componentDidUpdate(prevProps: CascaderProps) {
let isOptionsChanged = false;
if (!isEqual(prevProps.treeData, this.props.treeData)) {
isOptionsChanged = true;
this.foundation.collectOptions();
}
if (prevProps.value !== this.props.value && !isOptionsChanged) {
... | huxiangdev/semi-design | packages/semi-ui/cascader/index.tsx | TypeScript |
FunctionDeclaration |
function serialize(data: string): Buffer {
const header: Buffer = Buffer.alloc(5);
header.writeUInt8(0, 0); // TODO: Uncompressed only
header.writeInt32BE(data.length, 1);
return Buffer.concat([header, Buffer.from(data, 'utf8')]);
} | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
() => {
assert2.clearMustCalls();
} | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
done => {
const responseMetadata = new Metadata();
responseMetadata.add('key', 'value');
const callStream = new Http2CallStream(
'foo',
{} as Http2Channel,
callStreamArgs,
filterStackFactory
);
const http2Stream = new ClientHttp2StreamMock({
payload: Buffer.alloc(0),
... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
metadata => {
assert.deepStrictEqual(metadata.get('key'), ['value']);
} | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
() => {
const c = http2.constants;
const s = Status;
const errorCodeMapping = {
[c.NGHTTP2_NO_ERROR]: s.INTERNAL,
[c.NGHTTP2_PROTOCOL_ERROR]: s.INTERNAL,
[c.NGHTTP2_INTERNAL_ERROR]: s.INTERNAL,
[c.NGHTTP2_FLOW_CONTROL_ERROR]: s.INTERNAL,
[c.NGHTTP2_SETTINGS_TIMEOUT]: s.INTERNA... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
key => Number(key) | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
key => {
const value = errorCodeMapping[key];
// A null value indicates: behavior isn't specified, so skip this test.
const maybeSkip = (fn: typeof it) => (value ? fn : fn.skip);
maybeSkip(it)(`for error code ${key}`, () => {
return new Promise((resolve, reject) => {
const cal... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
(fn: typeof it) => (value ? fn : fn.skip) | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
() => {
return new Promise((resolve, reject) => {
const callStream = new Http2CallStream(
'foo',
{} as Http2Channel,
callStreamArgs,
filterStackFactory
);
const http2Stream = new ClientHttp2StreamMock({
payload: Buffer.al... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
const callStream = new Http2CallStream(
'foo',
{} as Http2Channel,
callStreamArgs,
filterStackFactory
);
const http2Stream = new ClientHttp2StreamMock({
payload: Buffer.alloc(0),
frameLengths: [... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
status => {
try {
assert.strictEqual(status.code, value);
resolve();
} catch (e) {
reject(e);
}
} | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
done => {
const callStream = new Http2CallStream(
'foo',
{} as Http2Channel,
callStreamArgs,
filterStackFactory
);
assert.strictEqual(callStream.getDeadline(), callStreamArgs.deadline);
assert.strictEqual(callStream.getStatus(), null);
const credentials = CallCredentials.cre... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
status => {
assert.strictEqual(status.code, Status.CANCELLED);
assert.strictEqual(status.details, ';)');
assert.strictEqual(callStream.getStatus(), status);
} | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
() => {
it('should handle an empty message', done => {
const callStream = new Http2CallStream(
'foo',
{} as Http2Channel,
callStreamArgs,
filterStackFactory
);
const http2Stream = new ClientHttp2StreamMock({
payload: serialize(''),
frameLengths: [],... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
done => {
const callStream = new Http2CallStream(
'foo',
{} as Http2Channel,
callStreamArgs,
filterStackFactory
);
const http2Stream = new ClientHttp2StreamMock({
payload: serialize(''),
frameLengths: [],
});
callStream.once(
'data',... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
buffer => {
assert.strictEqual(buffer.toString('utf8'), '');
} | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
() => 1 | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
(testCase: { description: string; frameLengths: number[] }) => {
it(`should handle a short message where ${
testCase.description
}`, done => {
const callStream = new Http2CallStream(
'foo',
{} as Http2Channel,
callStreamArgs,
filterStackFactory
... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
done => {
const callStream = new Http2CallStream(
'foo',
{} as Http2Channel,
callStreamArgs,
filterStackFactory
);
const http2Stream = new ClientHttp2StreamMock({
payload: serialize(message), // 21 bytes
frameLengths: testCase.frameLen... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
buffer => {
assert.strictEqual(buffer.toString('utf8'), message);
} | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
ArrowFunction |
(testCase: { description: string; frameLengths: number[] }) => {
it(`should handle two messages where ${testCase.description}`, done => {
const callStream = new Http2CallStream(
'foo',
{} as Http2Channel,
callStreamArgs,
filterStackFactory
);
const ... | SProst/grpc-node | packages/grpc-js/test/test-call-stream.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.