chore(release): prepare public source release
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
class Worker:
|
||||
def build(self, value: int) -> int:
|
||||
return value + 1
|
||||
|
||||
|
||||
def helper(value: int) -> int:
|
||||
return value * 2
|
||||
|
||||
|
||||
def build_twice(value: int) -> int:
|
||||
worker = Worker()
|
||||
return helper(worker.build(value))
|
||||
@@ -0,0 +1,7 @@
|
||||
function Invoke-ModuleTask {
|
||||
param(
|
||||
[int]$Count
|
||||
)
|
||||
|
||||
$Count + 1
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
function Invoke-Helper {
|
||||
param(
|
||||
[string]$Name
|
||||
)
|
||||
|
||||
"hello $Name"
|
||||
}
|
||||
|
||||
class TaskRunner {
|
||||
[string] Format([string]$Name) {
|
||||
return "task:$Name"
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-Formatting {
|
||||
param(
|
||||
[string]$Name
|
||||
)
|
||||
|
||||
$runner = [TaskRunner]::new()
|
||||
Invoke-Helper -Name $Name | Out-Null
|
||||
$runner.Format($Name)
|
||||
}
|
||||
|
||||
enum TaskState {
|
||||
Ready = 0
|
||||
Running = 1
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace Mercury.Game;
|
||||
|
||||
public class RocketBuilder
|
||||
{
|
||||
public void Build(string name)
|
||||
{
|
||||
}
|
||||
|
||||
public class NestedThing
|
||||
{
|
||||
public int Build(int value)
|
||||
{
|
||||
return value + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public record BuildPlan(string Name);
|
||||
|
||||
public static class BuildPlanFactory
|
||||
{
|
||||
public static void BuildRocket(string name)
|
||||
{
|
||||
var builder = new RocketBuilder();
|
||||
builder.Build(name);
|
||||
_ = new RocketBuilder.NestedThing().Build(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package mercury.demo;
|
||||
|
||||
public class Service {
|
||||
public void execute() {
|
||||
}
|
||||
|
||||
private record Result(String name) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
pub mod nested {
|
||||
pub struct Widget {
|
||||
value: i32,
|
||||
}
|
||||
|
||||
impl Widget {
|
||||
pub fn new(value: i32) -> Self {
|
||||
Self { value }
|
||||
}
|
||||
|
||||
pub fn helper(&self) -> i32 {
|
||||
self.value + 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Runner {
|
||||
fn run(&self) -> bool;
|
||||
}
|
||||
|
||||
pub fn helper(name: &str) -> String {
|
||||
format!("hello, {name}")
|
||||
}
|
||||
|
||||
pub fn call_helper(widget: &nested::Widget, name: &str) -> (String, i32) {
|
||||
(helper(name), widget.helper())
|
||||
}
|
||||
|
||||
pub const HELPER_LABEL: &str = "widget";
|
||||
@@ -0,0 +1,21 @@
|
||||
package service
|
||||
|
||||
type Runner interface {
|
||||
Run() error
|
||||
}
|
||||
|
||||
type Worker struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
func NewWorker(name string) *Worker {
|
||||
return &Worker{Name: name}
|
||||
}
|
||||
|
||||
func (w *Worker) Run() error {
|
||||
return w.help()
|
||||
}
|
||||
|
||||
func (w *Worker) help() error {
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
export function helper(value) {
|
||||
return value.trim();
|
||||
}
|
||||
|
||||
export const makeGreeter = (name) => {
|
||||
return `hello ${name}`;
|
||||
};
|
||||
|
||||
export class BrowserThing {
|
||||
open(url) {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
export function demo(value, url) {
|
||||
const browser = new BrowserThing();
|
||||
return helper(browser.open(url ?? value));
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
export interface Report {
|
||||
title: string;
|
||||
}
|
||||
|
||||
export type Builder = (name: string) => string;
|
||||
|
||||
export function helper(name: string): string {
|
||||
return name.toUpperCase();
|
||||
}
|
||||
|
||||
export const makeTyped = (value: number): number => {
|
||||
return value + 1;
|
||||
};
|
||||
|
||||
export namespace Tools {
|
||||
export function open(path: string): string {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
export function renderReport(name: string, path: string): Report {
|
||||
return {
|
||||
title: helper(Tools.open(path)) + name,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export abstract class Screen {
|
||||
render(): string {
|
||||
return "screen";
|
||||
}
|
||||
}
|
||||
|
||||
export const makeScreen = (name: string): string => {
|
||||
return `<div>${name}</div>`;
|
||||
};
|
||||
|
||||
export const renderScreen = (screen: Screen): string => {
|
||||
return screen.render();
|
||||
};
|
||||
Reference in New Issue
Block a user