type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
video(url: string) {
return this.attachment({type: 'video', payload: {url}})
} | webNeat/messenger-chat | src/events/EventBuilder.ts | TypeScript |
MethodDeclaration |
file(url: string) {
return this.attachment({type: 'file', payload: {url}})
} | webNeat/messenger-chat | src/events/EventBuilder.ts | TypeScript |
MethodDeclaration |
location(lat: number, long: number, url: string) {
return this.attachment({type: 'location', payload: {url, coordinates: {lat, long}}})
} | webNeat/messenger-chat | src/events/EventBuilder.ts | TypeScript |
MethodDeclaration |
protected validate() {
const {recipientId, senderId, items} = this.data
if (recipientId === undefined)
throw `The recipient is missing, use .to(recipientId) to set the recipient`
if (senderId === undefined) throw `The sender is missing, use .from(senderId) to set the sender`
if (items.length === ... | webNeat/messenger-chat | src/events/EventBuilder.ts | TypeScript |
MethodDeclaration |
protected build() {
const {recipientId, senderId, items} = this.data
const entry = items.map(({timestamp, ...data}) => {
return {
id: recipientId,
time: timestamp,
messaging: [
{
timestamp,
sender: {id: senderId},
recipient: {id: recip... | webNeat/messenger-chat | src/events/EventBuilder.ts | TypeScript |
MethodDeclaration |
private message(data: Omit<MessageEvent, 'mid'>) {
const mid = `m-${nextFakeMessageId++}`
const item = {timestamp: this.data.timestamp, message: {mid, ...data}}
return this.clone({items: [...this.data.items, item]})
} | webNeat/messenger-chat | src/events/EventBuilder.ts | TypeScript |
MethodDeclaration |
private attachment(data: EventAttachment) {
return this.message({attachments: [data]})
} | webNeat/messenger-chat | src/events/EventBuilder.ts | TypeScript |
FunctionDeclaration |
async function fetchPackageDetail() {
try {
const detailPkg = await API.getPackage({
packageName: packageName,
version: version,
repositoryKind: repositoryKind,
repositoryName: repositoryName,
});
let metaTitle = `${detailPkg.normalizedName} ${detailPkg.version} · ... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(props: Props) => {
const history = useHistory();
const [isLoadingPackage, setIsLoadingPackage] = useState(false);
const [packageName, setPackageName] = useState(props.packageName);
const [repositoryKind, setRepositoryKind] = useState(props.repositoryKind);
const [repositoryName, setRepositoryName] = useStat... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
() => {
if (!isUndefined(props.packageName) && !isLoadingPackage) {
setPackageName(props.packageName);
setVersion(props.version);
setRepositoryKind(props.repositoryKind);
setRepositoryName(props.repositoryName);
}
} | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
() => {
setIsLoadingPackage(true);
fetchPackageDetail();
/* eslint-disable react-hooks/exhaustive-deps */
} | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
() => {
return () => {
setIsLoadingPackage(false);
};
} | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
() => {
setIsLoadingPackage(false);
} | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(channel: string) => {
history.replace({
search: `?channel=${channel}`,
});
setActiveChannel(channel);
} | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(wrapperClassName?: string): JSX.Element | null => (
<div className={wrapperClassName}>
<InstallationModal
package | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(): string | FalcoRules | undefined => {
let rules: string | FalcoRules | undefined;
if (
!isUndefined(detail) &&
!isNull(detail) &&
!isNull(detail.data) &&
!isUndefined(detail.data) &&
!isUndefined(detail.data.rules)
) {
if (isArray(detail.data.rules)) {
rules =... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(): OPAPolicies | undefined => {
let policies: OPAPolicies | undefined;
if (
!isUndefined(detail) &&
!isNull(detail) &&
!isNull(detail.data) &&
!isUndefined(detail.data) &&
!isUndefined(detail.data.policies)
) {
policies = detail.data.policies;
}
return policies;... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(): string | undefined => {
let manifest: string | undefined;
if (
!isUndefined(detail) &&
!isNull(detail) &&
!isNull(detail.data) &&
!isUndefined(detail.data) &&
!isUndefined(detail.data.manifestRaw)
) {
manifest = detail.data.manifestRaw as string;
}
return man... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(): CustomResourcesDefinition[] | undefined => {
let resources: CustomResourcesDefinition[] | undefined;
if (detail && detail.crds) {
let examples: CustomResourcesDefinitionExample[] = detail.crdsExamples || [];
resources = detail.crds.map((resourceDefinition: CustomResourcesDefinition) => {
... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(resourceDefinition: CustomResourcesDefinition) => {
return {
...resourceDefinition,
example: examples.find((info: any) => info.kind === resourceDefinition.kind),
};
} | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(info: any) => info.kind === resourceDefinition.kind | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(): JSX.Element | null => {
const resources = getCRDs();
if (!isUndefined(resources) && resources.length > 0) {
return (
<div className={`mb-5 ${styles.codeWrapper}`}>
<AnchorHeader level={2} scrollIntoView={scrollIntoView} title="Custom Resource Definitions" />
<CustomResour... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(withRepoInfo: boolean, extraStyle?: string): JSX.Element => (
<>
<OfficialBadge official={isPackageOfficial(detail)} | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
() => {
if (props.hash !== currentHash) {
setCurrentHash(props.hash);
if (isUndefined(props.hash) || props.hash === '') {
window.scrollTo(0, 0);
} else {
scrollIntoView();
}
}
} | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(id?: string) => {
const elId = id || props.hash;
if (isUndefined(elId) || elId === '') return;
try {
const element = document.querySelector(elId);
if (element) {
element.scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'smooth' });
if (isUndefined(i... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
(): { content: JSX.Element; titles: string } | null => {
if (isNull(detail) || isUndefined(detail)) return null;
let additionalTitles = '';
const additionalContent = (
<>
{(() => {
switch (detail.repository.kind) {
case RepositoryKind.Falco:
let rules: stri... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
() => {
switch (detail.repository.kind) {
case RepositoryKind.Falco:
let rules: string | FalcoRules | undefined = getFalcoRules();
if (!isUndefined(rules)) {
additionalTitles += '# Rules\n';
}
return (
<>
... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
() => {
switch (typeof rules) {
case 'string':
return (
<div className="d-flex d-xxl-inline-block mw-100 position-relative">
<BlockCodeButtons content={rules} filename={`${detail.... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
ArrowFunction |
() => {
switch (detail.repository.kind) {
case RepositoryKind.TektonTask:
return (
<TektonManifestModal
normalizedName={detail.normalizedName}
... | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
searchUrlReferer?: SearchFiltersURL;
fromStarredPage?: boolean;
packageName: string;
version?: string;
repositoryKind: string;
repositoryName: string;
hash?: string;
channel?: string;
visibleModal?: string;
visibleValuesSchemaPath?: string;
visibleTemplate?: string;
} | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
isPackageOfficial(detail) | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
tsQueryWeb ? (
< | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
getBadges(false, 'mt-1') | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
getBadges(true, 'mt-3 mt-md-0') | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
isNull(detail) | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
isNull(apiError) | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
getInstallationModal('mb-2') | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
getManifestRaw() | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
isNull(detail | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
MethodDeclaration |
isNull(additionalInfo) | danielhass/hub | web/src/layout/package/index.tsx | TypeScript |
InterfaceDeclaration |
export default interface DataProps {
title?: string;
content?: string;
date?: string;
location?: string;
picture?: string;
initialValue?:any;
clear?:any;
} | danielhampikian/ionic5_react_app | realtime_database/src/components/DataProps.ts | TypeScript |
ArrowFunction |
(s: number[]) => this.onSelectionChanged(s) | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
ArrowFunction |
() => (this.defaultPointColor as any) | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration | /**
* Create points, set their locations and actually instantiate the
* geometry.
*/
private addSprites(scene: THREE.Scene) {
// Create geometry.
this.geometry = new THREE.BufferGeometry();
this.createBufferAttributes();
let canvas = document.createElement('canvas');
let image = this.image ... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
private calibratePointSize() {
let numPts = this.dataSet.points.length;
let scaleConstant = 200;
let logBase = 8;
// Scale point size inverse-logarithmically to the number of points.
this.pointSize3D = scaleConstant / Math.log(numPts) / Math.log(logBase);
this.pointSize2D = this.pointSize3D / 1... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
private setFogDistances(nearestPointZ: number, farthestPointZ: number) {
if (this.sceneIs3D) {
this.fog.near = nearestPointZ;
// If there are fewer points we want less fog. We do this
// by making the "far" value (that is, the distance from the camera to the
// far edge of the fog) proporti... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration | /**
* Set up buffer attributes to be used for the points/images.
*/
private createBufferAttributes() {
let numPoints = this.dataSet.points.length;
this.pickingColors = new Float32Array(numPoints * RGB_NUM_BYTES);
let colors = new THREE.BufferAttribute(this.pickingColors, RGB_NUM_BYTES);
// Fill p... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
private colorSprites(colorAccessor: (index: number) => string) {
if (this.geometry == null) {
return;
}
let colors = this.geometry.getAttribute('color') as THREE.BufferAttribute;
colors.array = this.renderColors;
let getColor: (index: number) => string = (() => undefined);
if (this.image ... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
private highlightSprites(
highlightedPoints: number[], highlightStroke: (index: number) => string) {
if (this.geometry == null) {
return;
}
let highlights =
this.geometry.getAttribute('isHighlight') as THREE.BufferAttribute;
for (let i = 0; i < this.dataSet.points.length; i++) {
... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration | /* Updates the positions buffer array to reflect the actual data. */
private updatePositionsArray() {
// Update the points.
for (let i = 0; i < this.dataSet.points.length; i++) {
// Set position based on projected point.
let pp = this.dataSet.points[i].projectedPoint;
this.positionBuffer.setXY... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
removeAllFromScene(scene: THREE.Scene) {
scene.remove(this.points);
} | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration | /**
* Generate a texture for the points/images and sets some initial params
*/
createTexture(image: HTMLImageElement|HTMLCanvasElement): THREE.Texture {
let tex = new THREE.Texture(image);
tex.needsUpdate = true;
// Used if the texture isn't a power of 2.
tex.minFilter = THREE.LinearFilter;
te... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
onDataSet(dataSet: DataSet, spriteImage: HTMLImageElement) {
this.dataSet = dataSet;
this.image = spriteImage;
this.points = null;
if (this.geometry) {
this.geometry.dispose();
}
this.geometry = null;
this.calibratePointSize();
let positions =
new Float32Array(this.dataSe... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
onSelectionChanged(selection: number[]) {
this.defaultPointColor =
(selection.length > 0) ? POINT_COLOR_GRAYED : POINT_COLOR;
} | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
onSetDayNightMode(isNight: boolean) {
this.blending = (isNight ? BLENDING_NIGHT : BLENDING_DAY);
} | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
onRecreateScene(
scene: THREE.Scene, sceneIs3D: boolean, backgroundColor: number) {
this.sceneIs3D = sceneIs3D;
this.fog = new THREE.Fog(backgroundColor);
scene.fog = this.fog;
this.addSprites(scene);
this.colorSprites(null);
this.highlightSprites(null, null);
} | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
onUpdate() {
this.updatePositionsArray();
} | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
onResize(newWidth: number, newHeight: number) {} | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
onPickingRender(camera: THREE.Camera, cameraTarget: THREE.Vector3) {
if (!this.geometry) {
return;
}
// Fog changes point colors, which alters the IDs.
this.fog.near = Infinity;
this.fog.far = Infinity;
this.points.material = this.pickingMaterial;
this.pickingMaterial.uniforms.isImag... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
MethodDeclaration |
onRender(rc: RenderContext) {
if (!this.geometry) {
return;
}
this.colorSprites(rc.colorAccessor);
this.highlightSprites(rc.highlightedPoints, rc.highlightStroke);
this.setFogDistances(
rc.nearestCameraSpacePointZ, rc.farthestCameraSpacePointZ);
this.points.material = this.rende... | ZhengyaoJiang/tensorflow | tensorflow/tensorboard/components/vz-projector/scatterPlotWebGLVisualizerSprites.ts | TypeScript |
FunctionDeclaration |
export function Home() {
const history = useHistory();
const { user, signInWithGoogle } = useAuth();
const [roomCode, setRoomCode] = useState('');
async function handleCreateRoom() {
if (!user) {
await signInWithGoogle();
}
history.push('/rooms/new');
}
async function handleJoinRoom(ev... | william-james-pj/Letmeask-NLW06 | src/pages/Home/index.tsx | TypeScript |
FunctionDeclaration |
async function handleCreateRoom() {
if (!user) {
await signInWithGoogle();
}
history.push('/rooms/new');
} | william-james-pj/Letmeask-NLW06 | src/pages/Home/index.tsx | TypeScript |
FunctionDeclaration |
async function handleJoinRoom(event: FormEvent) {
event.preventDefault();
if (roomCode.trim() === '') return;
const roomRef = await database.ref(`rooms/${roomCode}`).get();
if (!roomRef.exists()) {
toast.error('Room does not exists.');
return;
}
if (roomRef.val().endedAt) {
... | william-james-pj/Letmeask-NLW06 | src/pages/Home/index.tsx | TypeScript |
ArrowFunction |
() => {
const baseComponent = (props?: object) => <TestThemeProvider><DisabledPanel id='disabled-panel' { | adrielsand/adrbrowsiel-core | components/adrbrowsiel_rewards/resources/ui/components/disabledPanel/spec.tsx | TypeScript |
ArrowFunction |
(props?: object) => <TestThemeProvider><DisabledPanel id | adrielsand/adrbrowsiel-core | components/adrbrowsiel_rewards/resources/ui/components/disabledPanel/spec.tsx | TypeScript |
ArrowFunction |
() => {
it('matches the snapshot', () => {
const component = baseComponent()
const tree = create(component).toJSON()
expect(tree).toMatchSnapshot()
})
it('renders the component', () => {
const wrapper = shallow(baseComponent())
const assertion = wrapper.find('#disabled-panel'... | adrielsand/adrbrowsiel-core | components/adrbrowsiel_rewards/resources/ui/components/disabledPanel/spec.tsx | TypeScript |
ArrowFunction |
() => {
const component = baseComponent()
const tree = create(component).toJSON()
expect(tree).toMatchSnapshot()
} | adrielsand/adrbrowsiel-core | components/adrbrowsiel_rewards/resources/ui/components/disabledPanel/spec.tsx | TypeScript |
ArrowFunction |
() => {
const wrapper = shallow(baseComponent())
const assertion = wrapper.find('#disabled-panel').length
expect(assertion).toBe(1)
} | adrielsand/adrbrowsiel-core | components/adrbrowsiel_rewards/resources/ui/components/disabledPanel/spec.tsx | TypeScript |
ArrowFunction |
props => {
const Slots = getSlots<ICollapsibleSectionTitleProps, ICollapsibleSectionTitleSlots>(props, {
root: 'button',
chevron: Icon,
text: Text,
});
const buttonProps = getNativeProps<React.HTMLAttributes<HTMLButtonElement>>(props, buttonProperties);
return (
<Slots.root {...buttonProps} r... | Adloya/fluentui | packages/react-experiments/src/components/CollapsibleSection/CollapsibleSectionTitle.view.tsx | TypeScript |
ClassDeclaration | /**
* The content and the mode of a file.
* Default file mode is a text file which has code '100644'.
* If `content` is not null, then `content` must be the entire file content.
* See https://developer.github.com/v3/git/trees/#tree-object for details on mode.
*/
export declare class FileData {
readonly mode: F... | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
ClassDeclaration |
export declare class PatchSyntaxError extends Error {
constructor(message: string);
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* GitHub definition of tree
*/
export interface TreeObject {
path: string;
mode: FileMode;
type: 'blob' | 'tree' | 'commit';
sha?: string | null;
content?: string;
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* The domain of a repository
*/
export interface RepoDomain {
repo: string;
owner: string;
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* The domain for a branch
*/
export interface BranchDomain extends RepoDomain {
branch: string;
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* The descriptive properties for any entity
*/
export interface Description {
title: string;
body: string;
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* The user options for creating GitHub PRs
*/
export interface CreatePullRequestUserOptions {
upstreamOwner: string;
upstreamRepo: string;
message: string;
description: string;
title: string;
branch?: string;
force?: boolean;
fork?: boolean;
primary?: string;
maintainersCan... | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* GitHub data needed for creating a PR
*/
export interface CreatePullRequest {
upstreamOwner: string;
upstreamRepo: string;
message: string;
description: string;
title: string;
branch: string;
force: boolean;
primary: string;
maintainersCanModify: boolean;
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* The user options for creating GitHub PR review comment
*/
export interface CreateReviewCommentUserOptions {
owner: string;
repo: string;
pullNumber: number;
pageSize?: number;
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* The user options for creating GitHub PR review comment
*/
export interface CreateReviewComment {
owner: string;
repo: string;
pullNumber: number;
pageSize: number;
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* The file content of the original content and the patched content
*/
export interface FileDiffContent {
readonly oldContent: string;
readonly newContent: string;
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
InterfaceDeclaration |
export interface Hunk {
readonly oldStart: number;
readonly oldEnd: number;
readonly newStart: number;
readonly newEnd: number;
readonly newContent: string[];
readonly previousLine?: string;
readonly nextLine?: string;
} | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
TypeAliasDeclaration |
export declare type FileMode = '100644' | '100755' | '040000' | '160000' | '120000'; | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
TypeAliasDeclaration | /**
* The map of a path to its content data.
* The content must be the entire file content.
*/
export declare type Changes = Map<string, FileData>; | bcoe/release-please | node_modules/code-suggester/build/src/types/index.d.ts | TypeScript |
FunctionDeclaration |
export function getJsonObj(obj: ConditionalInputLink, isParentJsonObj?: boolean): object {
const jsonObj = {
...(isParentJsonObj ? obj : (model.FlowPortLink.getJsonObj(obj) as ConditionalInputLink)),
...{
"fromLink": obj.fromLink ? model.OutputLink.getJsonObj(obj.fromLink) : undefined,
... | naikvenu/oci-typescript-sdk | lib/dataintegration/lib/model/conditional-input-link.ts | TypeScript |
InterfaceDeclaration | /**
* The information about the conditional input link.
*/
export interface ConditionalInputLink extends model.FlowPortLink {
"fromLink"?: model.OutputLink;
"fieldMap"?:
| model.RuleBasedFieldMap
| model.DirectFieldMap
| model.CompositeFieldMap
| model.DirectNamedFieldMap;
"condition"?: model.Ex... | naikvenu/oci-typescript-sdk | lib/dataintegration/lib/model/conditional-input-link.ts | TypeScript |
ArrowFunction |
(val?: string) => true | chengjunjian2020/low-code-large-screen | src/components/common/checkbox/checkbox.tsx | TypeScript |
ArrowFunction |
(val: string) => {
context.emit("update:modelValue", val);
context.emit("onUpdate:modelValue", val);
} | chengjunjian2020/low-code-large-screen | src/components/common/checkbox/checkbox.tsx | TypeScript |
ArrowFunction |
() => <ElCheckbox class | chengjunjian2020/low-code-large-screen | src/components/common/checkbox/checkbox.tsx | TypeScript |
MethodDeclaration |
setup(props, context) {
const checkboxValue = ref(props.modelValue);
watch(checkboxValue, (val: string) => {
context.emit("update:modelValue", val);
context.emit("onUpdate:modelValue", val);
}, { immediate: true })
return () => <ElCheckbox class="low-code-checkbo... | chengjunjian2020/low-code-large-screen | src/components/common/checkbox/checkbox.tsx | TypeScript |
FunctionDeclaration |
function buildStatements({ statements }: SerializedBlock, blocks: SerializedBlock[], symbolTable: SymbolTable, env: Environment): Program {
if (statements.length === 0) return EMPTY_PROGRAM;
return new BlockScanner(statements, blocks, symbolTable, env).scan();
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
ClassDeclaration |
export default class Scanner {
constructor(private block: SerializedTemplateBlock, private meta: TemplateMeta, private env: Environment) {
}
scanEntryPoint(): EntryPoint {
let { block, meta } = this;
let symbolTable = SymbolTable.forEntryPoint(meta);
let program = buildStatements(block, block.block... | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
ClassDeclaration |
export class BlockScanner {
public env: Environment;
private stack = new Stack<ChildBlockScanner>();
private reader: SyntaxReader;
constructor(statements: SerializedStatement[], private blocks: SerializedBlock[], private symbolTable: SymbolTable, env: Environment) {
this.stack.push(new ChildBlockScanner(... | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
ClassDeclaration |
class ChildBlockScanner {
public children: InlineBlock[] = [];
public program = new LinkedList<StatementSyntax>();
constructor(public symbolTable: SymbolTable) {}
addChild(block: InlineBlock) {
this.children.push(block);
}
addStatement(statement: StatementSyntax) {
this.program.append(statement)... | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
ClassDeclaration |
class SyntaxReader {
current: number = 0;
last: StatementSyntax = null;
constructor(private statements: SerializedStatement[], private symbolTable: SymbolTable, private scanner: BlockScanner) {}
next(): StatementSyntax {
let last = this.last;
if (last) {
this.last = null;
return last;
... | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
scanEntryPoint(): EntryPoint {
let { block, meta } = this;
let symbolTable = SymbolTable.forEntryPoint(meta);
let program = buildStatements(block, block.blocks, symbolTable, this.env);
return new EntryPoint(program, symbolTable);
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
scanLayout(): Layout {
let { block, meta } = this;
let { blocks, named, yields, hasPartials } = block;
let symbolTable = SymbolTable.forLayout(named, yields, hasPartials, meta);
let program = buildStatements(block, blocks, symbolTable, this.env);
return new Layout(program, symbolTable, named, yie... | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
scanPartial(symbolTable: SymbolTable): PartialBlock {
let { block } = this;
let { blocks, locals } = block;
let program = buildStatements(block, blocks, symbolTable, this.env);
return new PartialBlock(program, symbolTable, locals);
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
scan(): Program {
let statement: StatementSyntax;
while (statement = this.reader.next()) {
this.addStatement(statement);
}
return this.stack.current.program;
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
blockFor(symbolTable: SymbolTable, id: number): InlineBlock {
let block = this.blocks[id];
let childTable = SymbolTable.forBlock(this.symbolTable, block.locals);
let program = buildStatements(block, this.blocks, childTable, this.env);
return new InlineBlock(program, childTable, block.locals);
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
startBlock(locals: string[]) {
let childTable = SymbolTable.forBlock(this.symbolTable, locals);
this.stack.push(new ChildBlockScanner(childTable));
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.