add type infer code snippets