type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
FunctionDeclaration
function assertNoDependsOn(test: Test, assembly: cxapi.CloudAssembly, stack: Stack) { let templateText; if (!(stack instanceof NestedStack)) { templateText = JSON.stringify(assembly.getStackArtifact(stack.artifactId).template); } else { templateText = fs.readFileSync(path.join(assembly.directory, stack.t...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(test, addDep) => { // GIVEN const parent = new Stack(undefined, 'root'); const nested = new NestedStack(parent, 'Nested'); const resourceInParent = new CfnResource(parent, 'ResourceInParent', { type: 'PARENT' }); const resourceInNested = new CfnResource(nested, 'ResourceInNested', { type...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(test, addDep) => { // GIVEN const grantparent = new Stack(undefined, 'Grandparent'); const parent = new NestedStack(grantparent, 'Parent'); const nested = new NestedStack(parent, 'Nested'); const resourceInGrandparent = new CfnResource(grantparent, 'ResourceInGrandparent', { type: 'GRAND...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(test, addDep) => { // GIVEN const parent = new Stack(undefined, 'root'); const nested = new NestedStack(parent, 'Nested'); const resourceInParent = new CfnResource(parent, 'ResourceInParent', { type: 'PARENT' }); const resourceInNested = new CfnResource(nested, 'ResourceInNested', { type...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(test, addDep) => { // GIVEN const grandparent = new Stack(undefined, 'Grandparent'); const parent = new NestedStack(grandparent, 'Parent'); const nested = new NestedStack(parent, 'Nested'); const resourceInGrandparent = new CfnResource(grandparent, 'ResourceInGrandparent', { type: 'GRAND...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(test, addDep) => { // GIVEN const app = new App(); const stack1 = new Stack(app, 'Stack1'); const nested1 = new NestedStack(stack1, 'Nested1'); const resourceInNested1 = new CfnResource(nested1, 'ResourceInNested', { type: 'NESTED' }); const stack2 = new Stack(app, 'Stack2'); ...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(test, addDep) => { // GIVEN const app = new App(); const stack1 = new Stack(app, 'Stack1'); const nested1 = new NestedStack(stack1, 'Nested1'); const resourceInNested1 = new CfnResource(nested1, 'ResourceInNested', { type: 'NESTED' }); const stack2 = new Stack(app, 'Stack2'); ...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(test, addDep) => { // GIVEN const app = new App(); const stack = new Stack(app, 'Stack1'); const nested1 = new NestedStack(stack, 'Nested1'); const nested2 = new NestedStack(stack, 'Nested2'); const resourceInNested1 = new CfnResource(nested1, 'ResourceInNested1', { type: 'NESTED1'...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
() => nested1.addDependency(root)
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
() => nested2.addDependency(nested1)
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
() => nested2.addDependency(root)
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(source, target) => source.node.addDependency(target)
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(source, target) => source.addDependsOn(target)
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
x => x.id
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'between two resources in a top-level stack'(test: Test) { // GIVEN const app = new App(); const stack = new Stack(app, 'Stack'); const r1 = new CfnResource(stack, 'r1', { type: 'r1' }); const r2 = new CfnResource(stack, 'r2', { type: 'r2' }); // WHEN r1.addDependsOn(r2); ...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'top level stack depends on itself'(test: Test) { // GIVEN const app = new App(); const stack = new Stack(app, 'Stack'); // WHEN stack.addDependency(stack); // THEN const assembly = app.synth(); assertAssemblyDependency(test, assembly, stack, []); assertNoDepends...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'nested stack depends on itself'(test: Test) { // GIVEN const app = new App(); const parent = new Stack(app, 'Parent'); const nested = new NestedStack(parent, 'Nested'); // WHEN nested.addDependency(nested); // THEN assertNoDependsOn(test, app.synth(), parent); t...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'nested stack cannot depend on any of its parents'(test: Test) { // GIVEN const root = new Stack(); const nested1 = new NestedStack(root, 'Nested1'); const nested2 = new NestedStack(nested1, 'Nested2'); // THEN test.throws(() => nested1.addDependency(root), /Nested stack 'Default\/...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'any parent stack is by definition dependent on the nested stack so dependency is ignored'(test: Test) { // GIVEN const root = new Stack(); const nested1 = new NestedStack(root, 'Nested1'); const nested2 = new NestedStack(nested1, 'Nested2'); // WHEN root.addDependency(nested1); ...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'sibling nested stacks transfer to resources'(test: Test) { // GIVEN const stack = new Stack(); const nested1 = new NestedStack(stack, 'Nested1'); const nested2 = new NestedStack(stack, 'Nested2'); // WHEN nested1.addDependency(nested2); // THEN expect(stack).to(haveRe...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'nested stack depends on a deeply nested stack'(test: Test) { // GIVEN const stack = new Stack(); const nested1 = new NestedStack(stack, 'Nested1'); const nested2 = new NestedStack(stack, 'Nested2'); const nested21 = new NestedStack(nested2, 'Nested21'); // WHEN nested1.addDe...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'deeply nested stack depends on a parent nested stack'(test: Test) { // GIVEN const stack = new Stack(); const nested1 = new NestedStack(stack, 'Nested1'); const nested2 = new NestedStack(stack, 'Nested2'); const nested21 = new NestedStack(nested2, 'Nested21'); // WHEN nested...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'top-level stack depends on a nested stack within a sibling'(test: Test) { // GIVEN const app = new App(); const stack1 = new Stack(app, 'Stack1'); const nested1 = new NestedStack(stack1, 'Nested1'); const stack2 = new Stack(app, 'Stack2'); // WHEN stack2.addDependency(nested...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'nested stack within a sibling depends on top-level stack'(test: Test) { // GIVEN const app = new App(); const stack1 = new Stack(app, 'Stack1'); const nested1 = new NestedStack(stack1, 'Nested1'); const stack2 = new Stack(app, 'Stack2'); // WHEN nested1.addDependency(stack2)...
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'construct dependency'(test: Test) { testFunction(test, (source, target) => source.node.addDependency(target)); }
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
MethodDeclaration
'resource dependency'(test: Test) { testFunction(test, (source, target) => source.addDependsOn(target)); }
1davidmichael/aws-cdk
packages/@aws-cdk/aws-cloudformation/test/test.deps.ts
TypeScript
ArrowFunction
(p, i) => { return <Table.Row key={`${p.key}-${i}`}> <Table.Cell>{p.key}</Table.Cell> <Table.Cell><Ellipsis text={JSON.stringify(p.value)} /> </Table.Cell> </Table.Row> ...
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
ArrowFunction
k => ({ key: k, value: properties[k] })
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
ArrowFunction
p => p.value !== null && p.key !== null
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
ArrowFunction
p => p.key !== 'isNormalised'
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
ArrowFunction
(a, b) => stringOrder(a.key, b.key)
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
ClassDeclaration
class PropertiesTable extends React.Component<InnerProps> { render() { const { items } = this.props const totalProperties = items.length if (totalProperties === 0) { return <p>No properties</p> } return ( <Table> <Table.Header> ...
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
ClassDeclaration
export default class PaginatedPropertiesTable extends React.Component<Props> { render() { const { properties } = this.props // Convert to a list, sort and filter let items: Property[] if (properties != null) { items = Object.keys(properties) .map(k => (...
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
TypeAliasDeclaration
export type Props = { properties: PropertiesMap }
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
TypeAliasDeclaration
export type InnerProps = { items: Property[] }
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
MethodDeclaration
render() { const { items } = this.props const totalProperties = items.length if (totalProperties === 0) { return <p>No properties</p> } return ( <Table> <Table.Header> <Table.Row> <Table.Header...
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
MethodDeclaration
render() { const { properties } = this.props // Convert to a list, sort and filter let items: Property[] if (properties != null) { items = Object.keys(properties) .map(k => ({ key: k, value: properties[k] })) .filter(p => p.value !== null &&...
commitd/jonah-ui
packages/ketos-components/src/ketos/properties/PropertiesTable.tsx
TypeScript
FunctionDeclaration
export function normalizeItems<T, V>( tree: T[] = [], normalize: Normalizer<T, V> = defaultNormalizer, filter: Filter<T, V> = defaultFilter, sort?: Sorter<T, V> ) { const normalizeItem = (data: T) => { const { children, ...norm } = normalize(data) const normTree: Normalized<T, V> = { ...norm, data } ...
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
FunctionDeclaration
export function denormalizeItems<T, V>(tree: Normalized<T, V>[]) { return tree.map((item) => item.data) }
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
FunctionDeclaration
export function listTreeItems<T, V>( tree: Normalized<T, V>[] ): Normalized<T, V>[] { return tree.flatMap((item) => item.children ? [item, ...listTreeItems(item.children)].filter((item) => !item.disabled) : item ) }
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
FunctionDeclaration
export function labelize<T, V>( items: T[] = [], normalize: Normalizer<T, V>, join: string = ", " ) { return items.map((item) => normalize(item).label).join(join) }
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
ArrowFunction
(data: T) => { const { children, ...norm } = normalize(data) const normTree: Normalized<T, V> = { ...norm, data } if (children) { normTree.children = normalizeItems(children, normalize, filter, sort) } return normTree }
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
ArrowFunction
(item) => item.data
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
ArrowFunction
(item) => item.children ? [item, ...listTreeItems(item.children)].filter((item) => !item.disabled) : item
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
ArrowFunction
(item) => !item.disabled
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
ArrowFunction
(item) => normalize(item).label
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
ArrowFunction
(item) => { if (item instanceof Object && "value" in item && "label" in item) { return { value: item.value, label: item.label } } else { return { value: item, label: String(item) } } }
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
InterfaceDeclaration
export interface Normalized<T, V> { data: T value: V label: string disabled?: boolean children?: Normalized<T, V>[] }
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
InterfaceDeclaration
export interface Option<V = string> { value: V label: string }
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
TypeAliasDeclaration
export type Filter<T, V> = (item: Normalized<T, V>) => boolean
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
TypeAliasDeclaration
export type Sorter<T, V> = (item: Normalized<T, V>) => string | number
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
TypeAliasDeclaration
export type Normalizer<T, V = T> = (item: T) => { value: V label: string disabled?: boolean children?: T[] }
MTES-MCT/biocarburants
front/src/common-v2/utils/normalize.ts
TypeScript
FunctionDeclaration
function LineChart(props: ChartProps) { const data = makeDataFromProps(props); return <Line data={data} options={options} />; }
jsulpis/github-insights
src/components/charts/LineChart.tsx
TypeScript
ArrowFunction
(props: ChartProps) => { return canvas => { const ctx = canvas.getContext("2d"); const gradientFill = ctx.createLinearGradient(0, 100, 0, 0); gradientFill.addColorStop(0.1, "#fff"); gradientFill.addColorStop(1, chartColorLight); return { labels: props.data.map(data => data.label), da...
jsulpis/github-insights
src/components/charts/LineChart.tsx
TypeScript
ArrowFunction
canvas => { const ctx = canvas.getContext("2d"); const gradientFill = ctx.createLinearGradient(0, 100, 0, 0); gradientFill.addColorStop(0.1, "#fff"); gradientFill.addColorStop(1, chartColorLight); return { labels: props.data.map(data => data.label), datasets: [ { labe...
jsulpis/github-insights
src/components/charts/LineChart.tsx
TypeScript
ArrowFunction
data => data.label
jsulpis/github-insights
src/components/charts/LineChart.tsx
TypeScript
ArrowFunction
data => data.value
jsulpis/github-insights
src/components/charts/LineChart.tsx
TypeScript
ClassDeclaration
@Component({ selector: 'sc-unsubscribe', templateUrl: './unsubscribe.page.html', styleUrls: ['./unsubscribe.page.scss'], }) export class UnsubscribePage implements OnInit { valid: boolean = null; error: Trx; constructor(private activatedRoute: ActivatedRoute, private commsService: CommsService...
robholden/Snow-Capture
Frontend/Desktop/src/app/pages/everyone/unsubscribe-page/unsubscribe.page.ts
TypeScript
MethodDeclaration
// Unsubscribes the user with a given key // async unsubscribe(key: string) { // Quit if key is null if (!key) { this.valid = false; return; } // Verify the key with the server const resp = await this.commsService.unsubscribe(key); // Stop if res...
robholden/Snow-Capture
Frontend/Desktop/src/app/pages/everyone/unsubscribe-page/unsubscribe.page.ts
TypeScript
ArrowFunction
() => { it('create an instance', () => { const pipe = new StringReplacePipe(); expect(pipe).toBeTruthy(); }); }
google/if-this-then-ad
client/src/app/pipes/string-replace.pipe.spec.ts
TypeScript
ArrowFunction
() => { const pipe = new StringReplacePipe(); expect(pipe).toBeTruthy(); }
google/if-this-then-ad
client/src/app/pipes/string-replace.pipe.spec.ts
TypeScript
ArrowFunction
(req: IncomingMessage, res: ServerResponse, next?: () => void) => { const requestHandler = this.server.getRequestHandler(); return requestHandler(req, res, next); }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
ArrowFunction
() => { if (listener) { listener(); } this.listener(this.app); }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
ArrowFunction
resolve => this.app.close(() => { resolve(); })
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
ArrowFunction
() => { resolve(); }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
ArrowFunction
p => { serverManager.usePlugin(p); }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
ArrowFunction
() => { ConfigContext.set(this.options.config as UserConfig); AppContext.set({ ...appContext, distDirectory: path.join( options.pwd, options.config.output?.path || 'dist', ), }); }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
ArrowFunction
p => ({ server: p, cli: undefined, })
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
ClassDeclaration
export class Server { public options: ModernServerOptions; private server!: ModernServer | ModernDevServer; private app!: httpServer; private runner!: ServerHookRunner; constructor(options: ModernServerOptions) { this.options = options; } public getRequestHandler() { return (req: IncomingMes...
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
public getRequestHandler() { return (req: IncomingMessage, res: ServerResponse, next?: () => void) => { const requestHandler = this.server.getRequestHandler(); return requestHandler(req, res, next); }; }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
public ready(readyOptions: ReadyOptions = {}) { this.server.ready(readyOptions); }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
public async init() { const { options } = this; options.logger = options.logger || defaultLogger; options.metrics = options.metrics || defaultMetrics; // initialize server if (options.dev) { this.server = this.createDevServer(); } else { this.server = this.createProdServer(); ...
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
public listen(port = 8080, listener: any) { this.app.listen(process.env.PORT || port, () => { if (listener) { listener(); } this.listener(this.app); }); }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
public listener(app: httpServer) { this.server.onListening(app); }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
public async close() { await this.server.close(); await new Promise<void>(resolve => this.app.close(() => { resolve(); }), ); }
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
private createProdServer() { const { options } = this; if (options.apiOnly) { return new ModernAPIServer(options); } else if (options.ssrOnly) { return new ModernSSRServer(options); } else if (options.webOnly) { return new ModernWebServer(options); } else { return new Moder...
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
private createDevServer() { const { options } = this; const { ModernAPIDevServer, ModernSSRDevServer, ModernDevServer, } = require('./dev-server'); if (options.apiOnly) { return new ModernAPIDevServer(options); } else if (options.ssrOnly) { return new ModernSSRDevServ...
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
private async createHookRunner() { const { options } = this; options.plugins?.forEach(p => { serverManager.usePlugin(p); }); const appContext = await this.initAppContext(); serverManager.run(() => { ConfigContext.set(this.options.config as UserConfig); AppContext.set({ ....
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
MethodDeclaration
private async initAppContext() { const appDirectory = await initAppDir(); const loaded = await loadUserConfig(appDirectory); const plugins = this.options.plugins?.map(p => ({ server: p, cli: undefined, })); const appContext = initAppContext( appDirectory, plugins || [], ...
Mu-L/modern.js
packages/server/server/src/server/index.ts
TypeScript
ArrowFunction
() => { let component: AddEditTopicComponent; let fixture: ComponentFixture<AddEditTopicComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [AddEditTopicComponent], imports: [FormsModule], providers: [{ provide: DialogService }, { provide: UserService }] ...
WadeBarnes/gcpe-lup-admin
src/app/administration/topics/add-edit-topic/add-edit-topic.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [AddEditTopicComponent], imports: [FormsModule], providers: [{ provide: DialogService }, { provide: UserService }] }).compileComponents(); }
WadeBarnes/gcpe-lup-admin
src/app/administration/topics/add-edit-topic/add-edit-topic.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(AddEditTopicComponent); component = fixture.componentInstance; fixture.detectChanges(); }
WadeBarnes/gcpe-lup-admin
src/app/administration/topics/add-edit-topic/add-edit-topic.component.spec.ts
TypeScript
ArrowFunction
({ collectionName, classes }: HeaderProps) => { const history = useHistory(); return ( <Box mt="50px"> <Grid container alignItems="center" spacing={1}> <Grid item> <Button onClick={() => history.goBack()}> <ArrowBackIcon color="primary" /> </Button> </Grid>...
Magicianred/aqualink-app
packages/website/src/routes/Dashboard/Header/index.tsx
TypeScript
ArrowFunction
() => history.goBack()
Magicianred/aqualink-app
packages/website/src/routes/Dashboard/Header/index.tsx
TypeScript
ArrowFunction
() => createStyles({ name: { fontSize: 24, }, })
Magicianred/aqualink-app
packages/website/src/routes/Dashboard/Header/index.tsx
TypeScript
InterfaceDeclaration
interface HeaderIncomingProps { collectionName: string; }
Magicianred/aqualink-app
packages/website/src/routes/Dashboard/Header/index.tsx
TypeScript
TypeAliasDeclaration
type HeaderProps = HeaderIncomingProps & WithStyles<typeof styles>;
Magicianred/aqualink-app
packages/website/src/routes/Dashboard/Header/index.tsx
TypeScript
InterfaceDeclaration
export interface BackendTimingInfo { kernelMs: number; }
shayoisaack/annpso
node_modules/@tensorflow/tfjs-core/dist-es6/kernels/backend.d.ts
TypeScript
InterfaceDeclaration
export interface TensorStorage { read(dataId: DataId): Promise<TypedArray>; readSync(dataId: DataId): TypedArray; disposeData(dataId: DataId): void; write(dataId: DataId, values: TypedArray): void; fromPixels(pixels: ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, numChannels: ...
shayoisaack/annpso
node_modules/@tensorflow/tfjs-core/dist-es6/kernels/backend.d.ts
TypeScript
InterfaceDeclaration
export interface BackendTimer { time(f: () => void): Promise<BackendTimingInfo>; }
shayoisaack/annpso
node_modules/@tensorflow/tfjs-core/dist-es6/kernels/backend.d.ts
TypeScript
InterfaceDeclaration
export interface KernelBackend extends TensorStorage, BackendTimer { matMul(a: Tensor2D, b: Tensor2D, transposeA: boolean, transposeB: boolean): Tensor2D; slice<T extends Tensor>(x: T, begin: number[], size: number[]): T; stridedSlice<T extends Tensor>(x: T, begin: number[], end: number[], strides: number[...
shayoisaack/annpso
node_modules/@tensorflow/tfjs-core/dist-es6/kernels/backend.d.ts
TypeScript
FunctionDeclaration
export function MyPlants() { const [myPlants, setMyPlants] = useState<PlantProps[]>([]) const [loading, setLoading] = useState(true) const [nextWatered, setNextWatered] = useState<string>() useEffect(() => { async function loadStorageData() { const plantsStoraged = await loadPlant() const nex...
SilvioDiasJr/plantManager-React-Native
src/pages/MyPlants.tsx
TypeScript
FunctionDeclaration
async function loadStorageData() { const plantsStoraged = await loadPlant() const nextTime = formatDistance( new Date(plantsStoraged[0].dateTimeNotification).getTime(), new Date().getTime(), { locale: pt } ) setNextWatered( `Não esqueça de regar a ${plantsStora...
SilvioDiasJr/plantManager-React-Native
src/pages/MyPlants.tsx
TypeScript
FunctionDeclaration
function handleRemove(plant: PlantProps) { Alert.alert('Remover', `Deseja remover a ${plant.name}?`, [ { text: 'Não 🙏', style: 'cancel' }, { text: 'Sim 😥', onPress: async () => { try { await removePlant(plant.id) setMyPlants((ol...
SilvioDiasJr/plantManager-React-Native
src/pages/MyPlants.tsx
TypeScript
ArrowFunction
() => { async function loadStorageData() { const plantsStoraged = await loadPlant() const nextTime = formatDistance( new Date(plantsStoraged[0].dateTimeNotification).getTime(), new Date().getTime(), { locale: pt } ) setNextWatered( `Não esqueça de regar a $...
SilvioDiasJr/plantManager-React-Native
src/pages/MyPlants.tsx
TypeScript
ArrowFunction
async () => { try { await removePlant(plant.id) setMyPlants((oldData) => oldData.filter((item) => item.id !== plant.id) ) } catch (error) { Alert.alert('Não foi possível remover! 😥') } }
SilvioDiasJr/plantManager-React-Native
src/pages/MyPlants.tsx
TypeScript
ArrowFunction
(oldData) => oldData.filter((item) => item.id !== plant.id)
SilvioDiasJr/plantManager-React-Native
src/pages/MyPlants.tsx
TypeScript
ArrowFunction
(item) => item.id !== plant.id
SilvioDiasJr/plantManager-React-Native
src/pages/MyPlants.tsx
TypeScript
ArrowFunction
(file: UploadFile) => { this.previewImage = file.url || file.thumbUrl; this.previewVisible = true; }
doordie2/my-project
src/app/routes/friendCircle/friendCircle/friendCircle.component.ts
TypeScript
ArrowFunction
(res:any)=>{ console.log(JSON.stringify(res)) }
doordie2/my-project
src/app/routes/friendCircle/friendCircle/friendCircle.component.ts
TypeScript