UNPKG

mx-jpush-expo

Version:

Expo 集成极光推送(JPush)一体化解决方案,支持 iOS/Android 厂商通道

81 lines 2.72 kB
export type MergeResults = { contents: string; didClear: boolean; didMerge: boolean; }; /** * Merge the contents of two files together and add a generated header. * * @param src contents of the original file * @param newSrc new contents to merge into the original file * @param identifier used to update and remove merges * @param anchor regex to where the merge should begin * @param offset line offset to start merging at (<1 for behind the anchor) * @param comment comment style `//` or `#` */ export declare function mergeContents({ src, newSrc, tag, anchor, offset, comment, }: { src: string; newSrc: string; tag: string; anchor: string | RegExp; comment?: string; offset?: number; }): MergeResults; export declare function mergeContentsAtLine({ src, newSrc, tag, lineIndex, offset, comment, }: { src: string; newSrc: string; tag: string; lineIndex: number; comment?: string; offset?: number; }): MergeResults; export declare function mergeContentsAtEnd({ src, newSrc, tag, comment, }: { src: string; newSrc: string; tag: string; comment?: string; }): MergeResults; export declare function syncGeneratedContents({ src, newSrc, tag, anchor, offset, comment, }: { src: string; newSrc: string; tag: string; anchor: string | RegExp; comment?: string; offset?: number; }): MergeResults; export declare function syncGeneratedContentsAtLine({ src, newSrc, tag, lineIndex, offset, comment, }: { src: string; newSrc: string; tag: string; lineIndex: number; comment?: string; offset?: number; }): MergeResults; export declare function syncGeneratedContentsAtEnd({ src, newSrc, tag, comment, }: { src: string; newSrc: string; tag: string; comment?: string; }): MergeResults; export declare function replaceGeneratedContentsAtLine({ src, newSrc, tag, getLineIndex, offset, comment, }: { src: string; newSrc: string; tag: string; getLineIndex: (src: string) => number; comment?: string; offset?: number; }): MergeResults; export declare function removeContents({ src, tag }: { src: string; tag: string; }): MergeResults; /** * Removes the generated section from a file, returns null when nothing can be removed. * This sways heavily towards not removing lines unless it's certain that modifications were not made manually. * * @param src */ export declare function removeGeneratedContents(src: string, tag: string): string | null; export declare function createGeneratedHeaderComment(contents: string, tag: string, comment: string): string; export declare function createHash(src: string): string; //# sourceMappingURL=generateCode.d.ts.map