type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
() => {
var s = Set('abc');
expect(s.size).toBe(3)
expect(s.has('a')).toBe(true);
expect(s.has('b')).toBe(true);
expect(s.has('c')).toBe(true);
expect(s.has('abc')).toBe(false);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var seq = Immutable.Seq.of(1,2,3);
var s = Set(seq);
expect(s.has(1)).toBe(true);
expect(s.has(2)).toBe(true);
expect(s.has(3)).toBe(true);
expect(s.has(4)).toBe(false);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var seq = Immutable.Seq({a:null, b:null, c:null}).flip();
var s = Set(seq);
expect(s.toArray()).toEqual([[null,'a'], [null,'b'], [null,'c']]);
// Explicitly getting the values sequence
var s2 = Set(seq.valueSeq());
expect(s2.toArray()).toEqual(['a','b','c']);
// toSet() does this fo... | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.fromKeys({a:null, b:null, c:null});
expect(s.has('a')).toBe(true);
expect(s.has('b')).toBe(true);
expect(s.has('c')).toBe(true);
expect(s.has('d')).toBe(false);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var seq = Immutable.Seq({a:null, b:null, c:null});
var s = Set.fromKeys(seq);
expect(s.has('a')).toBe(true);
expect(s.has('b')).toBe(true);
expect(s.has('c')).toBe(true);
expect(s.has('d')).toBe(false);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.of(1,2,3);
expect(s.has(1)).toBe(true);
expect(s.has(2)).toBe(true);
expect(s.has(3)).toBe(true);
expect(s.has(4)).toBe(false);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.of(1,2,3);
expect(s.toArray()).toEqual([1,2,3]);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.of('a','b','c');
expect(s.toObject()).toEqual({a:'a',b:'b',c:'c'});
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.of(1,2,3);
var iterator = jest.genMockFunction();
s.forEach(iterator);
expect(iterator.mock.calls).toEqual([
[1, 1, s],
[2, 2, s],
[3, 3, s]
]);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s1 = Set.of('a', 'b', 'c');
var s2 = Set.of('d', 'b', 'wow');
var s3 = s1.union(s2);
expect(s3.toArray()).toEqual(['a', 'b', 'c', 'd', 'wow']);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s1 = Set.of('a', 'b', 'c');
var s2 = Set.of('c', 'a');
var s3 = s1.union(s2);
expect(s3).toBe(s1);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s1 = Set();
var s2 = Set.of('a', 'b', 'c');
var s3 = s1.union(s2);
expect(s3).toBe(s2);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s1 = Set([1,2,3]);
var emptySet = Set();
var l = Immutable.List([1,2,3]);
var s2 = s1.union(l);
var s3 = emptySet.union(l);
var o = Immutable.OrderedSet([1,2,3]);
var s4 = s1.union(o);
var s5 = emptySet.union(o);
expect(Set.isSet(s2)).toBe(true);
expect(Set.isSet(s3)... | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s1 = Set();
var s2 = s1.add('a');
var s3 = s2.add('b');
var s4 = s3.add('c');
var s5 = s4.add('b');
expect(s1.size).toBe(0);
expect(s2.size).toBe(1);
expect(s3.size).toBe(2);
expect(s4.size).toBe(3);
expect(s5.size).toBe(3);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s1 = Set();
var s2 = s1.add('a');
var s3 = s2.add('b');
var s4 = s3.add('c');
var s5 = s4.remove('b');
expect(s1.size).toBe(0);
expect(s2.size).toBe(1);
expect(s3.size).toBe(2);
expect(s4.size).toBe(3);
expect(s5.size).toBe(2);
expect(s3.has('b')).toBe(true);
... | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.of('A').remove('A');
expect(s).toBe(Set());
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.of('A', 'B', 'C').union(Set.of('C', 'D', 'E'), Set.of('D', 'B', 'F'));
expect(s).is(Set.of('A','B','C','D','E','F'));
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.of('A', 'B', 'C').intersect(Set.of('B', 'C', 'D'), Set.of('A', 'C', 'E'));
expect(s).is(Set.of('C'));
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.of('A', 'B', 'C').subtract(Set.of('C', 'D', 'E'), Set.of('D', 'B', 'F'));
expect(s).is(Set.of('A'));
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s1 = Set.of('A', 'B', 'C');
expect(s1.equals(null)).toBe(false);
var s2 = Set.of('C', 'B', 'A');
expect(s1 === s2).toBe(false);
expect(Immutable.is(s1, s2)).toBe(true);
expect(s1.equals(s2)).toBe(true);
// Map and Set are not the same (keyed vs unkeyed)
var v1 = Immutable.... | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var js = Immutable.Set().withMutations(set => {
set.union([ 'a' ]);
set.add('b');
}).toJS();
expect(js).toEqual(['a', 'b']);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
set => {
set.union([ 'a' ]);
set.add('b');
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
() => {
var s = Set.of('A', 'B', 'C');
expect(s.isSuperset(['B', 'C'])).toBe(true);
expect(s.isSuperset(['B', 'C', 'D'])).toBe(false);
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
InterfaceDeclaration |
interface ExpectWithIs extends Expect {
is(expected: any): void;
not: ExpectWithIs;
} | DanielRosenwasser/immutable-js | __tests__/Set.ts | TypeScript |
ArrowFunction |
(manager: StatusBarItemsManager): readonly CommonStatusBarItem[] => {
const uiItemProviderIds = useAvailableUiItemsProviders();
const stageId = useActiveStageId();
const [items, setItems] = React.useState(manager.items);
const providersRef = React.useRef("");
const currentStageRef = React.useRef("");
... | rssahai/imodeljs | ui/framework/src/ui-framework/statusbar/useUiItemsProviderStatusBarItems.tsx | TypeScript |
ArrowFunction |
() => {
const uiProviders = uiItemProviderIds.join("-");
// istanbul ignore else
if (providersRef.current !== uiProviders || currentStageRef.current !== stageId) {
currentStageRef.current = stageId;
providersRef.current = uiProviders;
const statusBarItems = UiItemsManager.getStatusB... | rssahai/imodeljs | ui/framework/src/ui-framework/statusbar/useUiItemsProviderStatusBarItems.tsx | TypeScript |
ArrowFunction |
() => {
const handleChanged = (args: StatusBarItemsChangedArgs) => {
setItems(args.items);
};
manager.onItemsChanged.addListener(handleChanged);
return () => {
manager.onItemsChanged.removeListener(handleChanged);
};
} | rssahai/imodeljs | ui/framework/src/ui-framework/statusbar/useUiItemsProviderStatusBarItems.tsx | TypeScript |
ArrowFunction |
(args: StatusBarItemsChangedArgs) => {
setItems(args.items);
} | rssahai/imodeljs | ui/framework/src/ui-framework/statusbar/useUiItemsProviderStatusBarItems.tsx | TypeScript |
ArrowFunction |
() => {
manager.onItemsChanged.removeListener(handleChanged);
} | rssahai/imodeljs | ui/framework/src/ui-framework/statusbar/useUiItemsProviderStatusBarItems.tsx | TypeScript |
ClassDeclaration |
export abstract class CTRGladman extends BlockCipherMode {
public static Encryptor = CTRGladmanEncryptor;
public static Decryptor = CTRGladmanEncryptor;
} | star-dancer/crackpot | src/mode/CTR-GLADMAN.ts | TypeScript |
InterfaceDeclaration |
export interface IListConfig extends IDragConfig {
template?: (obj: IDataItem) => string;
data?: DataCollection<any> | any[];
virtual?: boolean;
itemHeight?: number | string;
css?: string;
height?: number | string;
selection?: boolean;
multiselection?: boolean | MultiselectionMode;
... | jorgemacias/solicitudes | public/libs/dhtmlx/types/ts-list/sources/types.d.ts | TypeScript |
InterfaceDeclaration |
export interface IListEventHandlersMap {
[key: string]: (...args: any[]) => any;
[ListEvents.click]: (id: string, e: Event) => any;
[ListEvents.itemMouseOver]: (id: string, e: Event) => any;
[ListEvents.doubleClick]: (id: string, e: Event) => any;
[ListEvents.itemRightClick]: (id: string, e: MouseE... | jorgemacias/solicitudes | public/libs/dhtmlx/types/ts-list/sources/types.d.ts | TypeScript |
InterfaceDeclaration |
export interface ISelectionConfig {
multiselection?: boolean | MultiselectionMode;
disabled?: boolean;
} | jorgemacias/solicitudes | public/libs/dhtmlx/types/ts-list/sources/types.d.ts | TypeScript |
InterfaceDeclaration |
export interface IList<T = any> {
config: IListConfig;
data: DataCollection<T>;
events: IEventSystem<DataEvents | ListEvents | DragEvents, IListEventHandlersMap & IDataEventsHandlersMap & IDragEventsHandlersMap>;
selection: ISelection;
paint(): void;
destructor(): void;
editItem(id: string)... | jorgemacias/solicitudes | public/libs/dhtmlx/types/ts-list/sources/types.d.ts | TypeScript |
InterfaceDeclaration |
export interface ISelection<T = any> {
config: ISelectionConfig;
events: IEventSystem<SelectionEvents | DataEvents, ISelectionEventsHandlersMap & IDataEventsHandlersMap>;
getId(): string | string[] | undefined;
getItem(): T;
contains(id?: string): boolean;
remove(id?: string): void;
add(id?... | jorgemacias/solicitudes | public/libs/dhtmlx/types/ts-list/sources/types.d.ts | TypeScript |
InterfaceDeclaration |
export interface IListItem {
[key: string]: any;
} | jorgemacias/solicitudes | public/libs/dhtmlx/types/ts-list/sources/types.d.ts | TypeScript |
EnumDeclaration |
export declare enum ListEvents {
click = "click",
doubleClick = "doubleclick",
focusChange = "focuschange",
beforeEditStart = "beforeEditStart",
afterEditStart = "afterEditStart",
beforeEditEnd = "beforeEditEnd",
afterEditEnd = "afterEditEnd",
itemRightClick = "itemRightClick",
item... | jorgemacias/solicitudes | public/libs/dhtmlx/types/ts-list/sources/types.d.ts | TypeScript |
TypeAliasDeclaration |
export declare type MultiselectionMode = "click" | "ctrlClick"; | jorgemacias/solicitudes | public/libs/dhtmlx/types/ts-list/sources/types.d.ts | TypeScript |
ClassDeclaration | /** Provides operations to manage the subscriptions property of the microsoft.graph.driveItem entity. */
export class SubscriptionItemRequestBuilder {
/** Path parameters for the request */
private readonly pathParameters: Record<string, unknown>;
/** The request adapter to use to execute the requests. */
... | microsoftgraph/msgraph-sdk-typescript | src/drives/item/items/item/subscriptions/item/subscriptionItemRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* Delete navigation property subscriptions for drives
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public createDeleteRequestInformation(requestConfiguration?: SubscriptionItemRequestBuil... | microsoftgraph/msgraph-sdk-typescript | src/drives/item/items/item/subscriptions/item/subscriptionItemRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* The set of subscriptions on the item. Only supported on the root of a drive.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public createGetRequestInformation(requestConfiguration?: Subsc... | microsoftgraph/msgraph-sdk-typescript | src/drives/item/items/item/subscriptions/item/subscriptionItemRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* Update the navigation property subscriptions in drives
* @param body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public createPatchRequestInformation(body: Subscription | undefin... | microsoftgraph/msgraph-sdk-typescript | src/drives/item/items/item/subscriptions/item/subscriptionItemRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* Delete navigation property subscriptions for drives
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
*/
... | microsoftgraph/msgraph-sdk-typescript | src/drives/item/items/item/subscriptions/item/subscriptionItemRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* The set of subscriptions on the item. Only supported on the root of a drive.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @param responseHandler Response handler to use in place of the default response handling provided by ... | microsoftgraph/msgraph-sdk-typescript | src/drives/item/items/item/subscriptions/item/subscriptionItemRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* Update the navigation property subscriptions in drives
* @param body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @param responseHandler Response handler to use in place of the default response handling provided by th... | microsoftgraph/msgraph-sdk-typescript | src/drives/item/items/item/subscriptions/item/subscriptionItemRequestBuilder.ts | TypeScript |
FunctionDeclaration | /**
* connects to the nest.land api and returns a url for package installation.
* @param {string} pkgName - package name.
* @param {string} version - specific version of the package.
* @return {string} package url.
*/
export async function nestPackageUrl(
pkgName: string,
version: string
): Promise<string> {
... | jajaperson/Trex | handlers/handle_third_party_package.ts | TypeScript |
FunctionDeclaration | /**
* download all dependencies and install packages from nest.land.
* @param {string} url - the url of the package to install.
* @return {void} void
*/
export async function cacheNestpackage(url: string): Promise<void> {
const process = Deno.run({
cmd: ["deno", "install", "-f", "-n", "trex_Cache_Map", "--uns... | jajaperson/Trex | handlers/handle_third_party_package.ts | TypeScript |
FunctionDeclaration | /**
* generates the url for packages that are installed from a repository.
* @param {string} repoInfo - repository information { user/repo/path_file }
* @param {string} pkgName - the name of the package to be saved in the import map file, by default use repository name.
* @return {string} url package.
*/
export fu... | jajaperson/Trex | handlers/handle_third_party_package.ts | TypeScript |
ArrowFunction |
(_) => offLine() | jajaperson/Trex | handlers/handle_third_party_package.ts | TypeScript |
ArrowFunction |
async (_parent, _args, ctx) => ctx.user !== null | link2cory/portfolio-backend | src/schema/permissions.ts | TypeScript |
ArrowFunction |
async (_parent, { where }, { prisma, user }) => {
// get the user based on the resource in question
const { userId: resourceOwnerId } = await prisma.bio.findOne({
where,
select: { userId: true },
});
// is the user the same as the one provided by context?
return resourceOwnerId === use... | link2cory/portfolio-backend | src/schema/permissions.ts | TypeScript |
ArrowFunction | // where.id is guarenteed to exist on updateOneBio
async (_parent, { where }, { prisma, user }) => {
// get the resource owner
// is nested destructuring with an alias hard to read?
const {
profile: { userId: resourceOwnerId },
} = await prisma.job.findOne({
where,
select: {
pr... | link2cory/portfolio-backend | src/schema/permissions.ts | TypeScript |
ArrowFunction |
() => {
test('request user', () => {
const action = actions.user.request({
name: 'rssviana',
});
const state = reducer(INITIAL_STATE, action);
expect({ ...state, updatedOn: 0 }).toStrictEqual(
{
...INITIAL_STATE,
loading: true,
success: false,
error: false... | rssviana/foribus-oraculi | src/store/user/reducer.test.ts | TypeScript |
ArrowFunction |
() => {
const action = actions.user.request({
name: 'rssviana',
});
const state = reducer(INITIAL_STATE, action);
expect({ ...state, updatedOn: 0 }).toStrictEqual(
{
...INITIAL_STATE,
loading: true,
success: false,
error: false,
messages: [],
}... | rssviana/foribus-oraculi | src/store/user/reducer.test.ts | TypeScript |
ArrowFunction |
() => {
const fakeRESP = userRESP
// @ts-ignore
const action = actions.user.success(fakeRESP)
const state = reducer(INITIAL_STATE, action);
expect({ ...state, updatedOn: 0 }).toStrictEqual({
...INITIAL_STATE,
data: [ fakeRESP ],
loading: false,
success: true,
error: ... | rssviana/foribus-oraculi | src/store/user/reducer.test.ts | TypeScript |
ArrowFunction |
() => {
const action = actions.user.failure(['error test']);
const state = reducer(INITIAL_STATE, action);
expect({ ...state, updatedOn: 0 }).toStrictEqual({
...INITIAL_STATE,
loading: false,
success: false,
error: true,
messages: ['error test'],
});
} | rssviana/foribus-oraculi | src/store/user/reducer.test.ts | TypeScript |
ArrowFunction |
() => {
it("should be empty object if no params given", () => {
const params: AttributeListUrlFilters = {};
const filterVariables = getFilterVariables(params);
expect(getExistingKeys(filterVariables)).toHaveLength(0);
});
it("should not be empty object if params given", () => {
const params: At... | DustinBracy/saleor-dashboard | src/attributes/views/AttributeList/filters.test.ts | TypeScript |
ArrowFunction |
() => {
const params: AttributeListUrlFilters = {};
const filterVariables = getFilterVariables(params);
expect(getExistingKeys(filterVariables)).toHaveLength(0);
} | DustinBracy/saleor-dashboard | src/attributes/views/AttributeList/filters.test.ts | TypeScript |
ArrowFunction |
() => {
const params: AttributeListUrlFilters = {
isVariantOnly: true.toString(),
};
const filterVariables = getFilterVariables(params);
expect(getExistingKeys(filterVariables)).toHaveLength(1);
} | DustinBracy/saleor-dashboard | src/attributes/views/AttributeList/filters.test.ts | TypeScript |
ArrowFunction |
() => {
const intl = createIntl(config);
const filters = createFilterStructure(intl, {
filterableInStorefront: {
active: false,
value: true,
},
isVariantOnly: {
active: false,
value: true,
},
valueRequired: {
active: false,
value: true,
},
visibleInS... | DustinBracy/saleor-dashboard | src/attributes/views/AttributeList/filters.test.ts | TypeScript |
ArrowFunction |
() => {
const filterQueryParams = getFilterQueryParams(
filters,
getFilterQueryParam,
);
expect(getExistingKeys(filterQueryParams)).toHaveLength(0);
} | DustinBracy/saleor-dashboard | src/attributes/views/AttributeList/filters.test.ts | TypeScript |
ArrowFunction |
() => {
const filterQueryParams = getFilterQueryParams(
setFilterOptsStatus(filters, true),
getFilterQueryParam,
);
expect(filterQueryParams).toMatchSnapshot();
expect(stringifyQs(filterQueryParams)).toMatchSnapshot();
} | DustinBracy/saleor-dashboard | src/attributes/views/AttributeList/filters.test.ts | TypeScript |
ArrowFunction |
({
value,
min,
max,
onChange,
step,
markers,
formatValue,
}) => {
const { getRailProps, getTrackProps, getHandleProps, getMarkerProps } = useSlider({
value,
min,
max,
onChange,
step,
formatValue,
})
return (
<SliderContainer>
<SliderRail {...getRailProps()} />
... | strvcom/react-sliders | examples/with-formik/components/Slider.tsx | TypeScript |
InterfaceDeclaration |
export interface ISliderProps {
value: number
min: number
max: number
onChange: (value: number) => void
step?: number
markers?: IRangeMarker[]
formatValue?: (value: number) => string
} | strvcom/react-sliders | examples/with-formik/components/Slider.tsx | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsEmpty, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, id()))
.then((tfn: string) => {
const result = readFileSync(tfn, 'utf8'... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = testContentsEmpty;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsWithEntries, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, id()))
.then((tfn: string) => {
const result = readFileSync(tfn, ... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = testContentsWithEntries;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsEmpty, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtEnd(insertedEntry)))
.then((tfn: string) => {
const result = re... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = resultInsertAtEndEmptySingle;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsEmpty, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtEnd(insertedEntryWithComma)))
.then((tfn: string) => {
const re... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsEmpty, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtEnd(insertedEntries)))
.then((tfn: string) => {
const result = ... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = resultInsertAtEndEmptyMulti;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsEmpty, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtEnd(insertedEntriesWithCommas)))
.then((tfn: string) => {
const... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsWithEntries, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtEnd(insertedEntry)))
.then((tfn: string) => {
const resul... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = resultInsertAtEndWithEntriesSingle;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsWithEntries, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtEnd(insertedEntryWithComma)))
.then((tfn: string) => {
co... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsWithEntries, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtEnd(insertedEntries)))
.then((tfn: string) => {
const res... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = resultInsertAtEndWithEntriesMulti;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsWithEntries, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtEnd(insertedEntriesWithCommas)))
.then((tfn: string) => {
... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsEmpty, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtStart(insertedEntry)))
.then((tfn: string) => {
const result = ... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = resultInsertAtStartEmptySingle;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsEmpty, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtStart(insertedEntryWithComma)))
.then((tfn: string) => {
const ... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsEmpty, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtStart(insertedEntries)))
.then((tfn: string) => {
const result ... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = resultInsertAtStartEmptyMulti;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsEmpty, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtStart(insertedEntriesWithCommas)))
.then((tfn: string) => {
con... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsWithEntries, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtStart(insertedEntry)))
.then((tfn: string) => {
const res... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = resultInsertAtStartWithEntriesSingle;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsWithEntries, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtStart(insertedEntryWithComma)))
.then((tfn: string) => {
... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsWithEntries, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtStart(insertedEntries)))
.then((tfn: string) => {
const r... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(tfn: string) => {
const result = readFileSync(tfn, 'utf8');
const expected = resultInsertAtStartWithEntriesMulti;
t.is(result, expected);
} | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
(t) => {
t.plan(1);
// Write test file
const targetFile = fileSync();
writeFileSync(targetFile.name, testContentsWithEntries, 'utf8');
transform(targetFile.name, targetFile.name, blocks(startPattern, endPattern, insertAtStart(insertedEntriesWithCommas)))
.then((tfn: string) => {
... | jmelis/launcher-creator-backend | test/template/transformer.blocks.test.ts | TypeScript |
ArrowFunction |
() => {
this.setState({
visible: !this.state.visible,
})
} | Clouddou2016/Imagine | modules/renderer/components/Collapse.tsx | TypeScript |
ClassDeclaration |
export default class Collapse extends PureComponent<ICollapseProps, ICollapseState> {
constructor(props: ICollapseProps) {
super(props)
this.state = {
visible: props.initialVisible || false,
}
}
handleClick = () => {
this.setState({
visible: !this.state.visible,
})
}
render... | Clouddou2016/Imagine | modules/renderer/components/Collapse.tsx | TypeScript |
InterfaceDeclaration |
interface ICollapseProps {
title: string
initialVisible?: boolean
} | Clouddou2016/Imagine | modules/renderer/components/Collapse.tsx | TypeScript |
InterfaceDeclaration |
interface ICollapseState {
visible: boolean
} | Clouddou2016/Imagine | modules/renderer/components/Collapse.tsx | TypeScript |
MethodDeclaration |
render() {
return (
<div className={classnames('collapse', {
'-hide': !this.state.visible,
})} | Clouddou2016/Imagine | modules/renderer/components/Collapse.tsx | TypeScript |
MethodDeclaration |
classnames('collapse', {
'-hide': !this | Clouddou2016/Imagine | modules/renderer/components/Collapse.tsx | TypeScript |
ClassDeclaration | /**
* @private
* @class module:azure-iot-device.BlobUploadResult
* @classdesc Result object used by the {@link module:azure-iot-device.blobUpload.BlobUploader} class to describe a successful upload to a blob.
*
* @params isSuccess {Boolean} Indicates whether the upload was successf... | SecureColdChain/Wipro-Ltd-ColdChain | Code/GatewayCode/OfflineAppSourceCode/node_modules/azure-iot-device/lib/blob_upload/blob_upload_result.d.ts | TypeScript |
MethodDeclaration | /**
* @method module:azure-iot-device.BlobUploadResult#fromAzureStorageCallbackArgs
* @description The `fromAzureStorageCallbackArgs` static method creates a new BlobUploadResult instance from the arguments passed to the callback of the azure storage upload method.
*
* @param {Obj... | SecureColdChain/Wipro-Ltd-ColdChain | Code/GatewayCode/OfflineAppSourceCode/node_modules/azure-iot-device/lib/blob_upload/blob_upload_result.d.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.